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