forked from poz/niksos
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";
|
description = "hostname to ssh into";
|
||||||
type = types.str;
|
type = types.str;
|
||||||
};
|
};
|
||||||
|
port = mkOption {
|
||||||
|
description = "port to ssh into";
|
||||||
|
type = with types; nullOr number;
|
||||||
|
default = null;
|
||||||
|
};
|
||||||
user = mkOption {
|
user = mkOption {
|
||||||
description = "ssh user";
|
description = "ssh user";
|
||||||
type = types.str;
|
type = types.str;
|
||||||
|
@ -77,6 +82,7 @@ in {
|
||||||
${concatStrings (mapAttrsToList (name: value: ''
|
${concatStrings (mapAttrsToList (name: value: ''
|
||||||
Host ${name}
|
Host ${name}
|
||||||
HostName ${value.hostName}
|
HostName ${value.hostName}
|
||||||
|
${if value.port != null then "Port ${toString value.port}" else ""}
|
||||||
User ${value.user}
|
User ${value.user}
|
||||||
IdentityFile ${value.identityFile}
|
IdentityFile ${value.identityFile}
|
||||||
IdentitiesOnly ${if value.identitiesOnly then "yes" else "no"}
|
IdentitiesOnly ${if value.identitiesOnly then "yes" else "no"}
|
||||||
|
|
Loading…
Reference in a new issue