1
0
Fork 0
This commit is contained in:
Lukas Wurzinger 2025-01-09 00:15:30 +01:00
parent f44a65d108
commit e0f1f5b6fb
No known key found for this signature in database
49 changed files with 10 additions and 2 deletions

View file

@ -0,0 +1,32 @@
{
self,
lib,
pkgs,
...
}: {
services.musicomp.jobs.main = {
music = "/srv/music";
comp = "/srv/compmusic";
timerConfig = {
OnCalendar = "daily";
Persistent = true;
};
inhibitsSleep = true;
post = let
remoteDir = self.nixosConfigurations.abacus.config.services.navidrome.settings.MusicFolder;
rsyncExe = lib.getExe pkgs.rsync;
rsh = "${lib.getExe pkgs.openssh} -i /etc/ssh/ssh_host_ed25519_key -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null";
in ''
${rsyncExe} \
--archive \
--recursive \
--delete \
--update \
--mkpath \
--verbose --verbose \
--exclude lost+found \
--rsh ${lib.escapeShellArg rsh} \
/srv/compmusic/ root@wrz.one:${remoteDir}
'';
};
}