nixos/syncoid: add possibility to use string type for sshKey options

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";`).

authored by

datafoo and committed by
Jörg Thalheim
480f5b14 d60cb669

+2 -6
+2 -6
nixos/modules/services/backup/syncoid.nix
··· 123 123 }; 124 124 125 125 sshKey = mkOption { 126 - type = types.nullOr types.path; 127 - # Prevent key from being copied to store 128 - apply = mapNullable toString; 126 + type = with types; nullOr (coercedTo path toString str); 129 127 default = null; 130 128 description = lib.mdDoc '' 131 129 SSH private key file to use to login to the remote system. Can be ··· 205 203 recursive = mkEnableOption (lib.mdDoc ''the transfer of child datasets''); 206 204 207 205 sshKey = mkOption { 208 - type = types.nullOr types.path; 209 - # Prevent key from being copied to store 210 - apply = mapNullable toString; 206 + type = with types; nullOr (coercedTo path toString str); 211 207 description = lib.mdDoc '' 212 208 SSH private key file to use to login to the remote system. 213 209 Defaults to {option}`services.syncoid.sshKey` option.