diff --git a/aplysia.nix b/aplysia.nix index a6fe647..5a16674 100644 --- a/aplysia.nix +++ b/aplysia.nix @@ -204,4 +204,28 @@ in ${pkgs.hdparm}/bin/hdparm -B127 -S100 /dev/sd{a,b,c,d,e,f} ''; + systemd.services.backup-fotos = rec { + wants = [ "network.target" "mnt-aplysia.mount" ]; + after = wants; + + serviceConfig = { + User = "gebner"; + Group = "users"; + Type = "oneshot"; + }; + + script = '' + ${pkgs.rclone}/bin/rclone sync -v --update --use-server-modtime \ + /mnt/aplysia/fotos/lightroom/ \ + glacier:gebner-fotos-raw-backup/ + ''; + }; + systemd.timers.backup-fotos = { + wantedBy = [ "timers.target" ]; + timerConfig = { + OnCalendar = "Mon,Fri 03:00"; + Persistent = true; + }; + }; + }