about summary refs log tree commit diff
path: root/hosts
diff options
context:
space:
mode:
Diffstat (limited to 'hosts')
-rw-r--r--hosts/common/server/gitea.nix12
1 files changed, 12 insertions, 0 deletions
diff --git a/hosts/common/server/gitea.nix b/hosts/common/server/gitea.nix
index 9b9bf83..b90ef51 100644
--- a/hosts/common/server/gitea.nix
+++ b/hosts/common/server/gitea.nix
@@ -27,4 +27,16 @@ in {
       user = cfg.user;
     };
   };
+
+  services.restic.backups = {
+    gitea = {
+      paths = [ cfg.Statedir ];
+      repository = "/data/slow/backups/systems";
+      passwordFile = config.age.secrets.restic-repo-systems.path;
+      timerConfig = { OnCalendar = "00:15"; };
+      initialize = true;
+      extraBackupArgs = [ "--tag gitea" ];
+      pruneOpts = [ "--keep-daily 7" "--keep-weekly 4 --keep-monthly 6" ];
+    };
+  };
 }