about summary refs log tree commit diff
path: root/hosts/common
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2022-03-09 18:37:51 -0800
committerFranck Cuny <franck@fcuny.net>2022-03-09 18:37:51 -0800
commite6f9e7b3fa1a05b7d9179ecb83f1ded950b06659 (patch)
treec161eea39d25a193d0f6e99bed9e585b30689870 /hosts/common
parentgitea: we need to specify the user for the DB (diff)
downloadworld-e6f9e7b3fa1a05b7d9179ecb83f1ded950b06659.tar.gz
gitea: do a backup with restic
Diffstat (limited to 'hosts/common')
-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" ];
+    };
+  };
 }