diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2022-11-07 20:51:39 +0100 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2022-11-07 20:51:39 +0100 |
commit | 0e9f1e85cd8c6f9d546ef88e971043b909017170 (patch) | |
tree | 5cb4d14df7594ef123f20d82cb2ec423b6bca744 /modules/borgsnap | |
parent | f563ddece04adfd8d80d4e984405f5c70a6c94f3 (diff) | |
download | nixos-0e9f1e85cd8c6f9d546ef88e971043b909017170.tar nixos-0e9f1e85cd8c6f9d546ef88e971043b909017170.tar.gz nixos-0e9f1e85cd8c6f9d546ef88e971043b909017170.tar.bz2 nixos-0e9f1e85cd8c6f9d546ef88e971043b909017170.tar.xz nixos-0e9f1e85cd8c6f9d546ef88e971043b909017170.zip |
...
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 | }; |