mirror of
https://github.com/daylinmorgan/oizys.git
synced 2024-12-22 10:10:45 -06:00
add systemd service to autocommit notes
This commit is contained in:
parent
f8491a5e96
commit
57c6c0ac0a
2 changed files with 22 additions and 1 deletions
21
hosts/othalan/services.nix
Normal file
21
hosts/othalan/services.nix
Normal file
|
@ -0,0 +1,21 @@
|
|||
{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";
|
||||
ExecStart = ''${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";
|
||||
};
|
||||
};
|
||||
}
|
|
@ -26,6 +26,6 @@ in {
|
|||
];
|
||||
proprietaryCodecs = true;
|
||||
})
|
||||
];
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue