diff --git a/shared/server-configuration.nix b/shared/server-configuration.nix index 9107302..3bb513b 100644 --- a/shared/server-configuration.nix +++ b/shared/server-configuration.nix @@ -146,6 +146,25 @@ in # }; # }; }; + + systemd.timers."pixel-backups" = { + wantedBy = [ "timers.target" ]; + timerConfig = { + OnCalendar = "daily"; + }; + }; + + systemd.services."pixel-backups" = { + script = '' + # Move files older than 90 days to the backups file + find /nfs_export/kage/syncthing/pixel_images/ -type f -mtime +90 | xargs -I {} mv {} /nfs_export/kage/Personal_Media/Nate/ + ''; + serviceConfig = { + Type = "oneshot"; + User = "root"; + }; + }; + # networking.firewall.allowedTCPPorts = [ ... ]; # networking.firewall.allowedUDPPorts = [ ... ];