drone: add backup for syncthing files

This commit is contained in:
wo2wz 2025-12-17 15:07:08 -05:00
parent 5930433925
commit a61b109678

View file

@ -40,8 +40,6 @@
script = "rm -r /var/backups/db-backup"; script = "rm -r /var/backups/db-backup";
serviceConfig.Type = "oneshot"; serviceConfig.Type = "oneshot";
}; };
restic-backups-main.serviceConfig.Type = "oneshot";
}; };
services.restic.backups.main = { services.restic.backups.main = {
@ -79,4 +77,24 @@
"/var/lib/vaultwarden/tmp/*" "/var/lib/vaultwarden/tmp/*"
]; ];
}; };
services.restic.backups.syncthing = {
user = "restic-backup";
package = pkgs.writeShellScriptBin "restic" ''
exec /run/wrappers/bin/restic "$@"
'';
environmentFile = config.sops.secrets."restic/rest-auth.env".path;
passwordFile = config.sops.secrets."restic/password".path;
timerConfig = {
OnCalendar = "03:05";
Persistent = true;
};
repository = "rest:http://localhost:8001/drone/syncthing";
initialize = true;
paths = [ "/var/lib/syncthing" ];
exclude = [ "/var/lib/syncthing/.*" ];
};
} }