clean up get-music, needs to be in it's own proflie

This commit is contained in:
Anish L 2022-06-14 23:27:12 +10:00
parent 438bb4b8a7
commit 59e2700336

View file

@ -1,12 +1,20 @@
{ pkgs, lib, ... }: { pkgs, lib, ... }:
{ {
services.cron = { systemd.services.get-music-sync = {
enable = true; serviceConfig.Type = "oneshot";
systemCronJobs = [ path = [
"* */24 * * * * anish /etc/get-music.sh" pkgs.coreutils
pkgs.rsync
]; ];
script = builtins.readFile ./get-music.sh;
serviceConfig = {
User = "anish";
};
};
systemd.timers.get-music-timer = {
wantedBy = [ "timers.target" ];
partOf = [ "get-music-sync.service" ];
timerConfig.OnCalendar = [ "daily" ];
}; };
environment.etc."get-music.sh".text = builtins.readFile "./get-music.sh";
evironment.systemPackages = [ pkgs.rsync ];
} }