2022-04-23 21:16:17 -07:00
|
|
|
{ pkgs, lib, ... }:
|
|
|
|
|
|
|
|
{
|
2022-06-14 06:27:12 -07:00
|
|
|
systemd.services.get-music-sync = {
|
|
|
|
serviceConfig.Type = "oneshot";
|
|
|
|
path = [
|
|
|
|
pkgs.coreutils
|
|
|
|
pkgs.rsync
|
2022-04-23 21:16:17 -07:00
|
|
|
];
|
2022-06-14 06:27:12 -07:00
|
|
|
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" ];
|
2022-04-23 21:16:17 -07:00
|
|
|
};
|
|
|
|
}
|