Added pixel image backup systemd timer

This commit is contained in:
Nathan Anderson 2024-03-23 03:43:52 -06:00
parent 45d9cadc71
commit 0f0280473f

View File

@ -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 = [ ... ];