about summary refs log tree commit diff
path: root/systems/cobalt/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'systems/cobalt/default.nix')
-rw-r--r--systems/cobalt/default.nix19
1 files changed, 19 insertions, 0 deletions
diff --git a/systems/cobalt/default.nix b/systems/cobalt/default.nix
index 5cb4eb5..fa1cd8b 100644
--- a/systems/cobalt/default.nix
+++ b/systems/cobalt/default.nix
@@ -151,6 +151,7 @@ in
     bsd-finger
   ];
 
+  sops.secrets.borg-cobalt-rolling-pass = {};
   sops.secrets.grafana-admin-pass = { owner = "grafana"; };
   sops.secrets.acme-envs = {
     owner = "acme";
@@ -171,6 +172,24 @@ in
   modules = {
     sops.enable = true;
 
+    services.backup = {
+      enable = true;
+
+      paths = [
+        "/persist"
+        "/home"
+      ];
+      exclude = [
+        # Rust build files
+        "/home/**/target"
+      ];
+
+      repo = "20963@hk-s020.rsync.net:rolling/exotic/cobalt";
+      repoKeyPath = config.sops.secrets.borg-cobalt-rolling-pass.path;
+      sshKeyPath = "/persist/ssh/ssh_host_ed25519_key";
+      rsyncNet = true;
+    };
+
     services.metrics = {
       enable = true;
       domain = "status.exotic.sh";