about summary refs log tree commit diff stats
path: root/modules/by-name/ba
diff options
context:
space:
mode:
authorBenedikt Peetz <benedikt.peetz@b-peetz.de>2025-05-05 07:11:58 +0200
committerBenedikt Peetz <benedikt.peetz@b-peetz.de>2025-05-05 07:11:58 +0200
commite6c9267a5ce44a4a8fea603dc1b4eec91a18e836 (patch)
tree4939fb823b6c7e6badc9e3d5700646cb5f76427d /modules/by-name/ba
parentpkgs/con2pdf: Correctly use `DEVICE_FUNCTION` as environment variable (diff)
downloadnixos-config-e6c9267a5ce44a4a8fea603dc1b4eec91a18e836.zip
module/backup: Provide administrative access to the storagebox
Diffstat (limited to '')
-rw-r--r--modules/by-name/ba/backup/module.nix18
1 files changed, 18 insertions, 0 deletions
diff --git a/modules/by-name/ba/backup/module.nix b/modules/by-name/ba/backup/module.nix
index eb7fedf0..d0805092 100644
--- a/modules/by-name/ba/backup/module.nix
+++ b/modules/by-name/ba/backup/module.nix
@@ -184,6 +184,24 @@ in {
           Persistent = true;
         };
       };
+
+      # This is only for listing, pruning and such stuff.
+      storagebox-admin = lib.mkIf cfg.storagebox.enable {
+        inhibitsSleep = false;
+        initialize = false;
+
+        passwordFile = config.age.secrets.resticStorageboxRepositoryPassword.path;
+        extraOptions = [
+          "rclone.program='ssh -p 23 ${cfg.storagebox.user}@${cfg.storagebox.user}.your-storagebox.de command_forced_on_remote'"
+        ];
+
+        # This setting is normally passed to rclone, but we force
+        # the command on the remote.
+        # As such, the value does not matter and must only be parseable by restic.
+        repository = "rclone: ";
+
+        timerConfig = null;
+      };
     };
   };
 }