factorio: update backup script filename to fix syncthing integration

This commit is contained in:
Leonardo Eugênio 2025-03-23 16:30:08 -03:00
parent a432569595
commit 4ebfaca007
No known key found for this signature in database
GPG key ID: 2F8F21CE8721456B

View file

@ -23,11 +23,12 @@
systemd.services.factorio-backup-save = { systemd.services.factorio-backup-save = {
description = "Backup factorio saves"; description = "Backup factorio saves";
script = '' script = ''
FILENAME="space-age-$(date --iso=seconds | tr ':' '_').zip"
${lib.getExe pkgs.rsync} \ ${lib.getExe pkgs.rsync} \
-av \ -av \
--chown=lelgenio \ --chown=lelgenio \
/var/lib/factorio/saves/default.zip \ /var/lib/factorio/saves/default.zip \
~lelgenio/Documentos/GameSaves/factorio_saves/space-age-$(date --iso=seconds).zip ~lelgenio/Documentos/GameSaves/factorio_saves/$FILENAME
''; '';
serviceConfig.Type = "oneshot"; serviceConfig.Type = "oneshot";
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];