diff --git a/nixos/modules/virtualisation/nixos-containers.nix b/nixos/modules/virtualisation/nixos-containers.nix index 44619513f577..d95ab944acd8 100644 --- a/nixos/modules/virtualisation/nixos-containers.nix +++ b/nixos/modules/virtualisation/nixos-containers.nix @@ -416,11 +416,11 @@ let description = "The protocol specifier for port forwarding between host and container"; }; hostPort = mkOption { - type = types.int; + type = types.port; description = "Source port of the external interface on host"; }; containerPort = mkOption { - type = types.nullOr types.int; + type = types.nullOr types.port; default = null; description = "Target port of container"; };