diff options
author | Silvan Mosberger <infinisil@icloud.com> | 2018-11-10 15:12:07 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-10 15:12:07 +0100 |
commit | e468a1091bd37f4e3b79a2fc42846e0089a4a2c4 (patch) | |
tree | 5daf8f9757615b9961ecf4f8df810cbfa7e833a8 /nixos | |
parent | 3cec0b0c174fcb6fdf37393593f4cb0d219cc30e (diff) | |
parent | 0885a651694853e2a125ecda5a37c3fe5e1ea005 (diff) |
Merge pull request #48687 from danielrutz/port-type
Add port type
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/doc/manual/development/option-types.xml | 13 | ||||
-rw-r--r-- | nixos/modules/services/networking/ssh/sshd.nix | 2 |
2 files changed, 13 insertions, 2 deletions
diff --git a/nixos/doc/manual/development/option-types.xml b/nixos/doc/manual/development/option-types.xml index e6c9eae11a728..d993e47bc914b 100644 --- a/nixos/doc/manual/development/option-types.xml +++ b/nixos/doc/manual/development/option-types.xml @@ -106,7 +106,7 @@ </para> </listitem> </varlistentry> - <varlistentry> + <varlistentry xml:id='types.ints.ux'> <term> <varname>types.ints.{u8, u16, u32}</varname> </term> @@ -131,6 +131,17 @@ </para> </listitem> </varlistentry> + <varlistentry> + <term> + <varname>types.port</varname> + </term> + <listitem> + <para> + A port number. This type is an alias to + <link linkend='types.ints.ux'><varname>types.ints.u16</varname></link>. + </para> + </listitem> + </varlistentry> </variablelist> <para> diff --git a/nixos/modules/services/networking/ssh/sshd.nix b/nixos/modules/services/networking/ssh/sshd.nix index c16fbe8a52fa2..5fab79f1b3d73 100644 --- a/nixos/modules/services/networking/ssh/sshd.nix +++ b/nixos/modules/services/networking/ssh/sshd.nix @@ -130,7 +130,7 @@ in }; ports = mkOption { - type = types.listOf types.int; + type = types.listOf types.port; default = [22]; description = '' Specifies on which ports the SSH daemon listens. |