parent
843215ac1c
commit
18bc8203a1
@ -261,10 +261,14 @@ let
|
|||||||
fi
|
fi
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
canonicalizePortList =
|
||||||
|
ports: lib.unique (builtins.sort builtins.lessThan ports);
|
||||||
|
|
||||||
commonOptions = {
|
commonOptions = {
|
||||||
allowedTCPPorts = mkOption {
|
allowedTCPPorts = mkOption {
|
||||||
type = types.listOf types.port;
|
type = types.listOf types.port;
|
||||||
default = [ ];
|
default = [ ];
|
||||||
|
apply = canonicalizePortList;
|
||||||
example = [ 22 80 ];
|
example = [ 22 80 ];
|
||||||
description =
|
description =
|
||||||
''
|
''
|
||||||
@ -287,6 +291,7 @@ let
|
|||||||
allowedUDPPorts = mkOption {
|
allowedUDPPorts = mkOption {
|
||||||
type = types.listOf types.port;
|
type = types.listOf types.port;
|
||||||
default = [ ];
|
default = [ ];
|
||||||
|
apply = canonicalizePortList;
|
||||||
example = [ 53 ];
|
example = [ 53 ];
|
||||||
description =
|
description =
|
||||||
''
|
''
|
||||||
|
Loading…
x
Reference in New Issue
Block a user