Commit 1c9a1469bc6d

Vincent Demeester <vincent@sbr.pm>
2025-12-19 16:16:28
chore(homelab): setup aix backup sync and disable TPM on sakhalin
- Enable daily media sync from aion to aix for off-site backup - Fix TPM2 errors on sakhalin by disabling unsupported hardware - Support 3-2-1 backup strategy with physical off-site location Signed-off-by: Vincent Demeester <vincent@sbr.pm>
1 parent 4b69cd1
Changed files (2)
systems
systems/aix/extra.nix
@@ -10,6 +10,26 @@ let
 
   # Aix's local IP for DNS resolution
   aixLocalIP = "192.168.1.75";
+
+  # Common rsync configuration for aion sync
+  aionSyncDefaults = {
+    source = {
+      host = "aion.sbr.pm";
+      user = "vincent";
+    };
+    destination = "/data";
+    delete = true; # Mirror mode: delete files in destination that don't exist in source
+    user = "vincent";
+    group = "users";
+    rsyncArgs = [
+      "--exclude=.Trash-*"
+      "--exclude=lost+found"
+      "--exclude=.stfolder"
+    ];
+    sshArgs = [
+      "-o StrictHostKeyChecking=accept-new"
+    ];
+  };
 in
 {
   imports = [
@@ -23,6 +43,25 @@ in
   users.users.vincent.linger = true;
 
   services = {
+    # Rsync data from aion to aix for local network access
+    rsync-replica = {
+      enable = true;
+      jobs = {
+        # Sync all data daily
+        aion-daily = aionSyncDefaults // {
+          source = aionSyncDefaults.source // {
+            paths = [
+              "/neo/music"
+              "/neo/pictures"
+              "/neo/ebooks"
+              "/neo/audiobooks"
+            ];
+          };
+          schedule = "daily";
+        };
+      };
+    };
+
     samba.settings = {
       global."server string" = "Aix";
       vincent = {
systems/sakhalin/extra.nix
@@ -90,6 +90,9 @@ in
     ../common/services/linkwarden.nix
   ];
 
+  # Disable TPM2 (hardware has no TPM chip)
+  security.tpm2.enable = lib.mkForce false;
+
   # Age secrets
   age.secrets."grafana-admin-password" = {
     file = ../../secrets/sakhalin/grafana-admin-password.age;