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 let
ports = port: infoPort: { ports = port: infoPort: {
port = lib.mkOption { port = lib.mkOption {
type = lib.types.int; type = lib.types.port;
default = port; default = port;
description = "RPC port"; description = "RPC port";
}; };
infoPort = lib.mkOption { infoPort = lib.mkOption {
type = lib.types.int; type = lib.types.port;
default = infoPort; default = infoPort;
description = "web UI port"; description = "web UI port";
}; };

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -417,7 +417,7 @@ in
}; };
port = mkOption { port = mkOption {
type = with types; nullOr int; type = with types; nullOr port;
default = null; default = null;
description = '' description = ''
I2P listen port. If no one is given the router will pick between 9111 and 30777. 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"; enable = mkEnableOption "iperf3 network throughput testing server";
package = mkPackageOption pkgs "iperf3" { }; package = mkPackageOption pkgs "iperf3" { };
port = mkOption { port = mkOption {
type = types.ints.u16; type = types.port;
default = 5201; default = 5201;
description = "Server port to listen on for iperf3 client requests."; description = "Server port to listen on for iperf3 client requests.";
}; };

View File

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

View File

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

View File

@@ -70,7 +70,7 @@ in
''; '';
}; };
Port = mkOption { Port = mkOption {
type = types.int; type = types.port;
default = 8888; default = 8888;
description = '' description = ''
Specify which port to listen to. 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`."; description = "Whether to open the firewall for the port in {option}`services.flood.port`.";
}; };
port = lib.mkOption { port = lib.mkOption {
type = lib.types.int; type = lib.types.port;
description = "Port to bind webserver."; description = "Port to bind webserver.";
default = 3000; default = 3000;
example = 3001; example = 3001;

View File

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

View File

@@ -80,7 +80,7 @@ let
port = mkOption { port = mkOption {
description = "The port to use for IP sockets. If port is not specified, port 80 (http) is used."; description = "The port to use for IP sockets. If port is not specified, port 80 (http) is used.";
default = null; default = null;
type = with types; nullOr int; type = with types; nullOr port;
}; };
proto = mkOption { proto = mkOption {
description = "PROTO can be 'HTTP' (the default) or 'PROXY'. Both version 1 and 2 of the proxy protocol can be used."; 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 { Port = lib.mkOption {
type = types.nullOr types.int; type = types.nullOr types.port;
default = null; default = null;
description = '' description = ''
If you set http proxy, waagent will use this proxy to access the Internet. If you set http proxy, waagent will use this proxy to access the Internet.