Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 3cec0b0c174f
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: e468a1091bd3
Choose a head ref
  • 4 commits
  • 3 files changed
  • 2 contributors

Commits on Oct 18, 2018

  1. Copy the full SHA
    161c076 View commit details
  2. nixos/sshd: Use port type instead of int

    This change leads to an additional check of the port number at build time, making invalid port values impossible.
    danielrutz committed Oct 18, 2018
    Copy the full SHA
    c98a7bf View commit details

Commits on Oct 19, 2018

  1. Copy the full SHA
    0885a65 View commit details

Commits on Nov 10, 2018

  1. Merge pull request #48687 from danielrutz/port-type

    Add port type
    infinisil authored Nov 10, 2018
    Copy the full SHA
    e468a10 View commit details
Showing with 16 additions and 2 deletions.
  1. +3 −0 lib/types.nix
  2. +12 −1 nixos/doc/manual/development/option-types.xml
  3. +1 −1 nixos/modules/services/networking/ssh/sshd.nix
3 changes: 3 additions & 0 deletions lib/types.nix
Original file line number Diff line number Diff line change
@@ -169,6 +169,9 @@ rec {
# s32 = sign 32 4294967296;
};

# Alias of u16 for a port number
port = ints.u16;

float = mkOptionType rec {
name = "float";
description = "floating point number";
13 changes: 12 additions & 1 deletion nixos/doc/manual/development/option-types.xml
Original file line number Diff line number Diff line change
@@ -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>
2 changes: 1 addition & 1 deletion nixos/modules/services/networking/ssh/sshd.nix
Original file line number Diff line number Diff line change
@@ -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.