Commit 480f5b14 authored by datafoo's avatar datafoo Committed by Jörg Thalheim
Browse files

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";`).
parent d60cb669
Loading
Loading
Loading
Loading
+2 −6
Original line number Diff line number Diff line
@@ -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.