From 0e9f1e85cd8c6f9d546ef88e971043b909017170 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Mon, 7 Nov 2022 20:51:39 +0100 Subject: ... --- modules/borgsnap/default.nix | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'modules/borgsnap/default.nix') diff --git a/modules/borgsnap/default.nix b/modules/borgsnap/default.nix index f4c0eec4..0a674e64 100644 --- a/modules/borgsnap/default.nix +++ b/modules/borgsnap/default.nix @@ -74,6 +74,15 @@ in { type = with types; listOf str; default = []; }; + + unknownUnencryptedRepoAccessOk = mkOption { + type = types.bool; + default = false; + }; + hostnameIsUnique = mkOption { + type = types.bool; + default = true; + }; }; }; @@ -95,9 +104,10 @@ in { "BORG_CACHE_DIR=/var/lib/borg/cache" "BORG_SECURITY_DIR=/var/lib/borg/security" "BORG_KEYS_DIR=/var/lib/borg/keys" - "BORG_UNKNOWN_UNENCRYPTED_REPO_ACCESS_IS_OK=yes" - "BORG_HOSTNAME_IS_UNIQUE=yes" - ] ++ optional (!(isNull cfg.sshConfig)) "BORG_RSH=\"${pkgs.openssh}/bin/ssh -F ${pkgs.writeText "config" cfg.sshConfig}\"" + ] + ++ optional cfg.unknownUnencryptedRepoAccessOk "BORG_UNKNOWN_UNENCRYPTED_REPO_ACCESS_IS_OK=yes" + ++ optional cfg.hostnameIsUnique "BORG_HOSTNAME_IS_UNIQUE=yes" + ++ optional (!(isNull cfg.sshConfig)) "BORG_RSH=\"${pkgs.openssh}/bin/ssh -F ${pkgs.writeText "config" cfg.sshConfig}\"" ++ optional (!(isNull cfg.keyfile)) "BORG_KEY_FILE=${cfg.keyfile}"; RuntimeDirectory = "zfssnap-prune"; }; -- cgit v1.2.3