treewide/nixos: move number typed port options to types.port

This commit is contained in:
Haylin Moore
2025-09-08 15:27:19 +02:00
parent b791e74ea9
commit cf540f8c98
19 changed files with 22 additions and 22 deletions

View File

@@ -178,12 +178,12 @@ in
let
ports = port: infoPort: {
port = lib.mkOption {
type = lib.types.int;
type = lib.types.port;
default = port;
description = "RPC port";
};
infoPort = lib.mkOption {
type = lib.types.int;
type = lib.types.port;
default = infoPort;
description = "web UI port";
};

View File

@@ -38,7 +38,7 @@ in
};
port = lib.mkOption {
type = lib.types.ints.u16;
type = lib.types.port;
default = 50000;
description = "Port to listen on.";
};

View File

@@ -861,7 +861,7 @@ in
default = "localhost";
};
port = lib.mkOption {
type = lib.types.int;
type = lib.types.port;
description = "Port for the MySQL database.";
default = 3306;
};
@@ -901,7 +901,7 @@ in
default = "localhost";
};
port = lib.mkOption {
type = lib.types.int;
type = lib.types.port;
description = "Port for the Postgres database.";
default = 5432;
};

View File

@@ -135,7 +135,7 @@ in
};
port = lib.mkOption {
type = lib.types.nullOr lib.types.int;
type = lib.types.nullOr lib.types.port;
default = null;
description = ''
Port number to bind to.

View File

@@ -26,7 +26,7 @@ let
description = "The address to bind to. Localhost if null";
};
port = mkOption {
type = natural';
type = port;
default = 10030;
description = "Tcp port to bind to";
};

View File

@@ -42,7 +42,7 @@ in
description = "Host to listen on.";
};
port = lib.mkOption {
type = lib.types.ints.u16;
type = lib.types.port;
default = 8181;
description = "Port to bind to.";
};

View File

@@ -75,7 +75,7 @@ in
};
port = lib.mkOption {
type = lib.types.ints.unsigned;
type = lib.types.port;
default = 7125;
description = "The port to listen on.";
};

View File

@@ -26,7 +26,7 @@
};
server = {
port = lib.mkOption {
type = lib.types.int;
type = lib.types.port;
description = "Port Number";
default = port;
};

View File

@@ -44,7 +44,7 @@ in
description = "Path to config file.";
};
port = lib.mkOption {
type = lib.types.ints.u16;
type = lib.types.port;
default = 8081;
description = "Port to bind to.";
};

View File

@@ -73,7 +73,7 @@ in
port = lib.mkOption {
description = "Port that stats listens for messages on over UDP";
default = 8125;
type = lib.types.int;
type = lib.types.port;
};
mgmt_address = lib.mkOption {
@@ -85,7 +85,7 @@ in
mgmt_port = lib.mkOption {
description = "Port to run the management TCP interface on";
default = 8126;
type = lib.types.int;
type = lib.types.port;
};
backends = lib.mkOption {

View File

@@ -417,7 +417,7 @@ in
};
port = mkOption {
type = with types; nullOr int;
type = with types; nullOr port;
default = null;
description = ''
I2P listen port. If no one is given the router will pick between 9111 and 30777.

View File

@@ -12,7 +12,7 @@ let
enable = mkEnableOption "iperf3 network throughput testing server";
package = mkPackageOption pkgs "iperf3" { };
port = mkOption {
type = types.ints.u16;
type = types.port;
default = 5201;
description = "Server port to listen on for iperf3 client requests.";
};

View File

@@ -9,7 +9,7 @@
'';
};
port = lib.mkOption {
type = lib.types.int;
type = lib.types.port;
example = 5088;
description = ''
Server host port.

View File

@@ -319,7 +319,7 @@ in
'';
};
port = lib.mkOption {
type = lib.types.nullOr lib.types.int;
type = lib.types.nullOr lib.types.port;
default = null;
description = ''
Port to listen to.

View File

@@ -70,7 +70,7 @@ in
'';
};
Port = mkOption {
type = types.int;
type = types.port;
default = 8888;
description = ''
Specify which port to listen to.

View File

@@ -19,7 +19,7 @@ in
description = "Whether to open the firewall for the port in {option}`services.flood.port`.";
};
port = lib.mkOption {
type = lib.types.int;
type = lib.types.port;
description = "Port to bind webserver.";
default = 3000;
example = 3001;

View File

@@ -100,7 +100,7 @@ in
};
port = mkOption {
type = types.nullOr types.int;
type = types.nullOr types.port;
default = null;
description = ''
The database's port. If not set, the default ports will be

View File

@@ -80,7 +80,7 @@ let
port = mkOption {
description = "The port to use for IP sockets. If port is not specified, port 80 (http) is used.";
default = null;
type = with types; nullOr int;
type = with types; nullOr port;
};
proto = mkOption {
description = "PROTO can be 'HTTP' (the default) or 'PROXY'. Both version 1 and 2 of the proxy protocol can be used.";

View File

@@ -220,7 +220,7 @@ let
};
Port = lib.mkOption {
type = types.nullOr types.int;
type = types.nullOr types.port;
default = null;
description = ''
If you set http proxy, waagent will use this proxy to access the Internet.