From dad995850306a7b7dc431ab4d8a29369fe25c2db Mon Sep 17 00:00:00 2001 From: Daniel Nagy Date: Tue, 25 May 2021 19:23:34 +0200 Subject: [PATCH 01/10] nixos/darkhttpd: set port type to `types.port` (cherry picked from commit a5321aecfb51c7abdd45254d821e8122820850d3) --- nixos/modules/services/web-servers/darkhttpd.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/services/web-servers/darkhttpd.nix b/nixos/modules/services/web-servers/darkhttpd.nix index d6649fd472d..f6b693139a1 100644 --- a/nixos/modules/services/web-servers/darkhttpd.nix +++ b/nixos/modules/services/web-servers/darkhttpd.nix @@ -19,7 +19,7 @@ in { port = mkOption { default = 80; - type = ints.u16; + type = types.port; description = '' Port to listen on. Pass 0 to let the system choose any free port for you. From 33ce03a6533440db2b84a7122989d7fe7b2ecfec Mon Sep 17 00:00:00 2001 From: Daniel Nagy Date: Tue, 25 May 2021 19:24:29 +0200 Subject: [PATCH 02/10] nixos/lighttpd: set port type to `types.port` (cherry picked from commit 941fd008ede8ad2423c257a18681011939d9fe11) --- nixos/modules/services/web-servers/lighttpd/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/services/web-servers/lighttpd/default.nix b/nixos/modules/services/web-servers/lighttpd/default.nix index d1cb8a8dc25..7a691aa7891 100644 --- a/nixos/modules/services/web-servers/lighttpd/default.nix +++ b/nixos/modules/services/web-servers/lighttpd/default.nix @@ -134,7 +134,7 @@ in port = mkOption { default = 80; - type = types.int; + type = types.port; description = '' TCP port number for lighttpd to bind to. ''; From 24e35b8c44704dee6a8827bf6b04e0058d163f71 Mon Sep 17 00:00:00 2001 From: Daniel Nagy Date: Tue, 25 May 2021 19:25:07 +0200 Subject: [PATCH 03/10] nixos/terraria: adapt option types (cherry picked from commit 137924cc96b589c8d335ff4a420b0e3bb208ac9e) --- nixos/modules/services/games/terraria.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nixos/modules/services/games/terraria.nix b/nixos/modules/services/games/terraria.nix index 9e8e5ae8759..7312c7e6b63 100644 --- a/nixos/modules/services/games/terraria.nix +++ b/nixos/modules/services/games/terraria.nix @@ -42,7 +42,7 @@ in }; port = mkOption { - type = types.int; + type = types.port; default = 7777; description = '' Specifies the port to listen on. @@ -50,7 +50,7 @@ in }; maxPlayers = mkOption { - type = types.int; + type = types.ints.u8; default = 255; description = '' Sets the max number of players (between 1 and 255). From d71b353d151d74ff5b1d13044c4d977efc34e93f Mon Sep 17 00:00:00 2001 From: Daniel Nagy Date: Tue, 25 May 2021 19:25:46 +0200 Subject: [PATCH 04/10] nixos/discourse: set port type to `types.port` (cherry picked from commit 73f9c29a2cd4e298493751ba1e3f1f5750021ad2) --- nixos/modules/services/web-apps/discourse.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/services/web-apps/discourse.nix b/nixos/modules/services/web-apps/discourse.nix index 49958fc6190..9c7166f381a 100644 --- a/nixos/modules/services/web-apps/discourse.nix +++ b/nixos/modules/services/web-apps/discourse.nix @@ -356,7 +356,7 @@ in }; port = lib.mkOption { - type = lib.types.int; + type = lib.types.port; default = 25; description = '' The port of the SMTP server Discourse should use to From 98d6d1dbf78511a5d36173ea9c7b96a1f1d34c48 Mon Sep 17 00:00:00 2001 From: Daniel Nagy Date: Tue, 25 May 2021 19:26:38 +0200 Subject: [PATCH 05/10] nixos/redis: set port type to `types.port` (cherry picked from commit 0cde374a7604821ceddd24d06ae21e44de59d04c) --- nixos/modules/services/databases/redis.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/services/databases/redis.nix b/nixos/modules/services/databases/redis.nix index c4d51958e23..9c0740f28c9 100644 --- a/nixos/modules/services/databases/redis.nix +++ b/nixos/modules/services/databases/redis.nix @@ -52,7 +52,7 @@ in { }; port = mkOption { - type = types.int; + type = types.port; default = 6379; description = "The port for Redis to listen to."; }; From 2c97740c47cea58cd602c54bc86d806e47dccc08 Mon Sep 17 00:00:00 2001 From: Daniel Nagy Date: Tue, 25 May 2021 19:27:42 +0200 Subject: [PATCH 06/10] nixos/gitDaemon: set port type to `types.port` (cherry picked from commit 048c45679fe6fda60b00bf45890e5990f0e6d9f2) --- nixos/modules/services/networking/git-daemon.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/services/networking/git-daemon.nix b/nixos/modules/services/networking/git-daemon.nix index 52c895215fb..98f80dd4bc4 100644 --- a/nixos/modules/services/networking/git-daemon.nix +++ b/nixos/modules/services/networking/git-daemon.nix @@ -74,7 +74,7 @@ in }; port = mkOption { - type = types.int; + type = types.port; default = 9418; description = "Port to listen on."; }; From fda7b068300782188bd77396a7a438787ad092cb Mon Sep 17 00:00:00 2001 From: Daniel Nagy Date: Tue, 25 May 2021 19:28:01 +0200 Subject: [PATCH 07/10] nixos/syncserver: set port type to `types.port` (cherry picked from commit 65b32a0afe69258e3fa2fb245ea2315c8683281f) --- nixos/modules/services/networking/firefox/sync-server.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/services/networking/firefox/sync-server.nix b/nixos/modules/services/networking/firefox/sync-server.nix index 6842aa73561..24f76864953 100644 --- a/nixos/modules/services/networking/firefox/sync-server.nix +++ b/nixos/modules/services/networking/firefox/sync-server.nix @@ -67,7 +67,7 @@ in }; listen.port = mkOption { - type = types.int; + type = types.port; default = 5000; description = '' Port on which the sync server listen to. From 28e57cb0c7316cf89552c991baac7c37f64c6bcc Mon Sep 17 00:00:00 2001 From: Daniel Nagy Date: Tue, 25 May 2021 19:29:16 +0200 Subject: [PATCH 08/10] nixos/matrix-synapse: set port type to types.port (cherry picked from commit 8e760f485873d202a0ad4aba7a78caabc85cf5db) --- nixos/modules/services/misc/matrix-synapse.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/services/misc/matrix-synapse.nix b/nixos/modules/services/misc/matrix-synapse.nix index dff58745304..d623e97b8b1 100644 --- a/nixos/modules/services/misc/matrix-synapse.nix +++ b/nixos/modules/services/misc/matrix-synapse.nix @@ -231,7 +231,7 @@ in { type = types.listOf (types.submodule { options = { port = mkOption { - type = types.int; + type = types.port; example = 8448; description = '' The port to listen for HTTP(S) requests on. From ab496da13814151d1e93c5bd49f6b31767578b33 Mon Sep 17 00:00:00 2001 From: Daniel Nagy Date: Tue, 25 May 2021 19:37:34 +0200 Subject: [PATCH 09/10] nixos/gitlab: set port type to `types.port` (cherry picked from commit cc5517da4c2221ee42163b69e1648cc472fcba0e) --- nixos/modules/services/misc/gitlab.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/services/misc/gitlab.nix b/nixos/modules/services/misc/gitlab.nix index 253d87537cf..4026a833759 100644 --- a/nixos/modules/services/misc/gitlab.nix +++ b/nixos/modules/services/misc/gitlab.nix @@ -462,7 +462,7 @@ in { }; port = mkOption { - type = types.int; + type = types.port; default = 8080; description = '' GitLab server port for copy-paste URLs, e.g. 80 or 443 if you're From 4d837a7a98f1bbc9fd8505794c587488cd5e3324 Mon Sep 17 00:00:00 2001 From: Daniel Nagy Date: Tue, 25 May 2021 19:37:54 +0200 Subject: [PATCH 10/10] nixos/monero: set port type to `types.port` (cherry picked from commit e57465a617f4cc993a7b32f90cb9e095f2b09596) --- nixos/modules/services/networking/monero.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/services/networking/monero.nix b/nixos/modules/services/networking/monero.nix index 952d1d47ca6..9a9084e4ce1 100644 --- a/nixos/modules/services/networking/monero.nix +++ b/nixos/modules/services/networking/monero.nix @@ -110,7 +110,7 @@ in }; rpc.port = mkOption { - type = types.int; + type = types.port; default = 18081; description = '' Port the RPC server will bind to.