forgjo backup

This commit is contained in:
glenn 2025-01-07 12:17:50 +01:00
parent 4d108b9464
commit af2abd3cb5

View file

@ -21,6 +21,25 @@ in {
};
};
services.restic.backups = {
"forgejo" = {
passwordFile = "/etc/nixos/.secrets/restic_pw";
repository = "sftp:Glenn@nas:/home/back/vaultwarden/restic";
initialize = true;
paths = [
"/var/lib/forgejo"
];
user = "root";
timerConfig.OnCalendar = "02:05";
pruneOpts = [
"--keep-daily 10"
"--keep-weekly 5"
"--keep-monthly 12"
"--keep-yearly 75"
];
};
};
environment.systemPackages = let
cfg = config.services.forgejo;
forgejo-cli = pkgs.writeScriptBin "forgejo-cli" ''