From aeba2fa7b6be8499a2ac405e0227abb28f7c5123 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Fri, 10 Jul 2026 10:34:47 -0700 Subject: [PATCH 1/2] nixos/systemd: allow listenStreams to contain ports --- nixos/lib/systemd-unit-options.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/lib/systemd-unit-options.nix b/nixos/lib/systemd-unit-options.nix index 8538c8519c53..86bb255a84c3 100644 --- a/nixos/lib/systemd-unit-options.nix +++ b/nixos/lib/systemd-unit-options.nix @@ -625,7 +625,7 @@ rec { listenStreams = mkOption { default = [ ]; - type = types.listOf types.str; + type = types.listOf (types.coercedTo types.port toString types.str); example = [ "0.0.0.0:993" "/run/my-socket" From 7d57ab127ec6799d0106da737a45e5c8a390dc9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Fri, 10 Jul 2026 10:57:39 -0700 Subject: [PATCH 2/2] nixos/rsyncd: specify listenStreams as int --- nixos/modules/services/network-filesystems/rsyncd.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/services/network-filesystems/rsyncd.nix b/nixos/modules/services/network-filesystems/rsyncd.nix index c3d81cb15302..8bae90b6cfda 100644 --- a/nixos/modules/services/network-filesystems/rsyncd.nix +++ b/nixos/modules/services/network-filesystems/rsyncd.nix @@ -132,7 +132,7 @@ in description = "socket for fast remote file copy program daemon"; conflicts = [ "rsync.service" ]; - listenStreams = [ (toString cfg.port) ]; + listenStreams = [ cfg.port ]; socketConfig.Accept = true; wantedBy = [ "sockets.target" ];