about summary refs log tree commit diff
path: root/modules/services
diff options
context:
space:
mode:
Diffstat (limited to 'modules/services')
-rw-r--r--modules/services/backup.nix6
1 files changed, 6 insertions, 0 deletions
diff --git a/modules/services/backup.nix b/modules/services/backup.nix
index a513d18..41d2329 100644
--- a/modules/services/backup.nix
+++ b/modules/services/backup.nix
@@ -59,6 +59,12 @@ in
     services.borgbackup.jobs.${cfg.name} = {
       inherit (cfg) paths exclude repo;
 
+      prune.keep = {
+        within = "1d"; # Keep all archives from the last day
+        daily = 7;
+        weekly = 4;
+        monthly = 3;
+      };
 
       encryption.mode = "repokey-blake2";
       encryption.passCommand = "cat ${cfg.repoKeyPath}";