diff options
| author | datafoo <34766150+datafoo@users.noreply.github.com> | 2023-09-01 11:48:51 +0200 |
|---|---|---|
| committer | github-actions[bot] <github-actions[bot]@users.noreply.github.com> | 2023-11-27 09:41:22 +0000 |
| commit | 0cb6160d8febf762b3af9f347a274f72566d525d (patch) | |
| tree | 78c03ee7163425e6738b8a11ba77ce9f9dc5d721 | |
| parent | Merge pull request #270285 from NixOS/backport-269637-to-release-23.11 (diff) | |
| download | nixpkgs-origin/backport-252747-to-release-23.11.tar.gz | |
nixos/syncoid: add possibility to use string type for sshKey optionsorigin/backport-252747-to-release-23.11
The sshKey options do not need to be a valid path at build time. Using
string instead allow use case when the path is not known at build time
such as when using systemd credentials (e.g. `sshKey =
"\${CREDENTIALS_DIRECTORY}/zfs-replication_ed25519";`).
(cherry picked from commit e98fd99eb3a6c81a18ea9494f684764e75315e8f)
| -rw-r--r-- | nixos/modules/services/backup/syncoid.nix | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/nixos/modules/services/backup/syncoid.nix b/nixos/modules/services/backup/syncoid.nix index 1a1df38617b5..f77010829575 100644 --- a/nixos/modules/services/backup/syncoid.nix +++ b/nixos/modules/services/backup/syncoid.nix @@ -123,9 +123,7 @@ in }; sshKey = mkOption { - type = types.nullOr types.path; - # Prevent key from being copied to store - apply = mapNullable toString; + type = with types; nullOr (coercedTo path toString str); default = null; description = lib.mdDoc '' SSH private key file to use to login to the remote system. Can be @@ -205,9 +203,7 @@ in recursive = mkEnableOption (lib.mdDoc ''the transfer of child datasets''); sshKey = mkOption { - type = types.nullOr types.path; - # Prevent key from being copied to store - apply = mapNullable toString; + type = with types; nullOr (coercedTo path toString str); description = lib.mdDoc '' SSH private key file to use to login to the remote system. Defaults to {option}`services.syncoid.sshKey` option. |
