From e6c9267a5ce44a4a8fea603dc1b4eec91a18e836 Mon Sep 17 00:00:00 2001 From: Benedikt Peetz Date: Mon, 5 May 2025 07:11:58 +0200 Subject: module/backup: Provide administrative access to the storagebox --- modules/by-name/ba/backup/module.nix | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) 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; + }; }; }; } -- cgit 1.4.1