diff --git a/modules/services/ssh.nix b/modules/services/ssh.nix index e94c48b4..b9a6170d 100644 --- a/modules/services/ssh.nix +++ b/modules/services/ssh.nix @@ -38,6 +38,11 @@ in { description = "hostname to ssh into"; type = types.str; }; + port = mkOption { + description = "port to ssh into"; + type = with types; nullOr number; + default = null; + }; user = mkOption { description = "ssh user"; type = types.str; @@ -77,6 +82,7 @@ in { ${concatStrings (mapAttrsToList (name: value: '' Host ${name} HostName ${value.hostName} + ${if value.port != null then "Port ${toString value.port}" else ""} User ${value.user} IdentityFile ${value.identityFile} IdentitiesOnly ${if value.identitiesOnly then "yes" else "no"}