about summary refs log tree commit diff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--hosts/common/server/unifi.nix14
1 files changed, 14 insertions, 0 deletions
diff --git a/hosts/common/server/unifi.nix b/hosts/common/server/unifi.nix
index ed1f82e..cf38137 100644
--- a/hosts/common/server/unifi.nix
+++ b/hosts/common/server/unifi.nix
@@ -62,5 +62,19 @@ in {
         Type = "oneshot";
       };
     };
+
+    age.secrets.restic-repo-systems.file =
+      ../../../secrets/restic/repo-systems.age;
+
+    services.restic.backups = {
+      unifi = {
+        paths = [ "/var/lib/unifi" ];
+        repository = "/data/slow/backups/systems";
+        passwordFile = config.age.secrets.restic-repo-systems.path;
+        initialize = true;
+        extraBackupArgs = [ "--tag unifi" ];
+        pruneOpts = [ "--keep-daily 7" "--keep-weekly 4" ];
+      };
+    };
   };
 }