chore: prune restic repo before backup

This commit is contained in:
Leon Schwarzäugl 2025-06-09 02:42:17 +02:00
parent 69ef705820
commit 155f629159
Signed by: swarsel
GPG key ID: 26A54C31F2A4FD84
3 changed files with 122 additions and 105 deletions

View file

@ -1,4 +1,4 @@
{ lib, config, inputs, ... }:
{ lib, pkgs, config, inputs, ... }:
let
secretsDirectory = builtins.toString inputs.nix-secrets;
resticRepo = lib.swarselsystems.getSecret "${secretsDirectory}/restic/wintersRepo";
@ -40,6 +40,9 @@ in
"--keep-monthly 3"
"--keep-yearly 100"
];
backupPrepareCommand = ''
${pkgs.restic}/bin/restic prune
'';
repository = "${resticRepo}";
initialize = true;
timerConfig = {