diff options
Diffstat (limited to 'modules/borgsnap')
| -rw-r--r-- | modules/borgsnap/default.nix | 16 |
1 files changed, 13 insertions, 3 deletions
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 { | |||
| 74 | type = with types; listOf str; | 74 | type = with types; listOf str; |
| 75 | default = []; | 75 | default = []; |
| 76 | }; | 76 | }; |
| 77 | |||
| 78 | unknownUnencryptedRepoAccessOk = mkOption { | ||
| 79 | type = types.bool; | ||
| 80 | default = false; | ||
| 81 | }; | ||
| 82 | hostnameIsUnique = mkOption { | ||
| 83 | type = types.bool; | ||
| 84 | default = true; | ||
| 85 | }; | ||
| 77 | }; | 86 | }; |
| 78 | }; | 87 | }; |
| 79 | 88 | ||
| @@ -95,9 +104,10 @@ in { | |||
| 95 | "BORG_CACHE_DIR=/var/lib/borg/cache" | 104 | "BORG_CACHE_DIR=/var/lib/borg/cache" |
| 96 | "BORG_SECURITY_DIR=/var/lib/borg/security" | 105 | "BORG_SECURITY_DIR=/var/lib/borg/security" |
| 97 | "BORG_KEYS_DIR=/var/lib/borg/keys" | 106 | "BORG_KEYS_DIR=/var/lib/borg/keys" |
| 98 | "BORG_UNKNOWN_UNENCRYPTED_REPO_ACCESS_IS_OK=yes" | 107 | ] |
| 99 | "BORG_HOSTNAME_IS_UNIQUE=yes" | 108 | ++ optional cfg.unknownUnencryptedRepoAccessOk "BORG_UNKNOWN_UNENCRYPTED_REPO_ACCESS_IS_OK=yes" |
| 100 | ] ++ optional (!(isNull cfg.sshConfig)) "BORG_RSH=\"${pkgs.openssh}/bin/ssh -F ${pkgs.writeText "config" cfg.sshConfig}\"" | 109 | ++ optional cfg.hostnameIsUnique "BORG_HOSTNAME_IS_UNIQUE=yes" |
| 110 | ++ optional (!(isNull cfg.sshConfig)) "BORG_RSH=\"${pkgs.openssh}/bin/ssh -F ${pkgs.writeText "config" cfg.sshConfig}\"" | ||
| 101 | ++ optional (!(isNull cfg.keyfile)) "BORG_KEY_FILE=${cfg.keyfile}"; | 111 | ++ optional (!(isNull cfg.keyfile)) "BORG_KEY_FILE=${cfg.keyfile}"; |
| 102 | RuntimeDirectory = "zfssnap-prune"; | 112 | RuntimeDirectory = "zfssnap-prune"; |
| 103 | }; | 113 | }; |
