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"