oizys/hosts/othalan/services.nix

24 lines
659 B
Nix
Raw Permalink Normal View History

{pkgs, ...}: let
notes-git = ''${pkgs.git}/bin/git -C /home/daylin/stuff/notes'';
in {
systemd.services.notes-bot = {
description = "auto commit changes to notes";
serviceConfig = {
Type = "oneshot";
User = "daylin";
2024-02-22 13:39:26 -06:00
ExecStart = ''
${pkgs.bash}/bin/bash -c '${notes-git} commit -m ":memo: :robot: $(${pkgs.coreutils}/bin/date +\'%%T\')" --no-gpg-sign -- notes'
'';
};
};
systemd.timers.notes-bot-timer = {
description = "run notes commit service";
wantedBy = ["timers.target"];
timerConfig = {
OnCalendar = "daily";
Persistent = true;
Unit = "notes-bot.service";
};
};
}