about summary refs log tree commit diff
path: root/nixos/alpha/configuration.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixos/alpha/configuration.nix')
-rw-r--r--nixos/alpha/configuration.nix24
1 files changed, 24 insertions, 0 deletions
diff --git a/nixos/alpha/configuration.nix b/nixos/alpha/configuration.nix
index 7e685d5..4c12ee9 100644
--- a/nixos/alpha/configuration.nix
+++ b/nixos/alpha/configuration.nix
@@ -105,6 +105,30 @@
     }
   ];
 
+  sops.secrets.borg-alpha-rolling-pass = { };
+  services.borgbackup.jobs.alpha-rolling = {
+    paths = [
+      "/persist"
+      "/home"
+    ];
+
+    exclude = [
+      # Rust build files
+      "**/target"
+    ];
+    repo = "20963@hk-s020.rsync.net:rolling/alpha";
+    encryption.mode = "repokey-blake2";
+    encryption.passCommand = "cat ${config.sops.secrets.borg-alpha-rolling-pass.path}";
+
+    environment.BORG_RSH = "ssh -i /persist/ssh/ssh_host_ed25519_key";
+    # use borg 1.0+ on rsync.net
+    environment.BORG_REMOTE_PATH="/usr/local/bin/borg1/borg1";
+    extraCreateArgs = "--verbose --stats --checkpoint-interval 600";
+    compression = "auto,zstd";
+    startAt = "daily";
+    persistentTimer = true;
+  };
+
   sound.enable = false;
 
   services.pipewire = {