add port to ssh module
This commit is contained in:
parent
ecc7622221
commit
d172cfcb68
1 changed files with 6 additions and 0 deletions
|
@ -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"}
|
||||
|
|
Loading…
Reference in a new issue