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" 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" ];