nat module: optionSet -> submodule

This commit is contained in:
Eric Sagnes 2016-09-11 18:05:05 +09:00
parent 1b3c03b49c
commit c3bdee3c39

View File

@ -122,9 +122,7 @@ in
}; };
networking.nat.forwardPorts = mkOption { networking.nat.forwardPorts = mkOption {
type = types.listOf types.optionSet; type = with types; listOf (submodule {
default = [];
example = [ { sourcePort = 8080; destination = "10.0.0.1:80"; } ];
options = { options = {
sourcePort = mkOption { sourcePort = mkOption {
type = types.int; type = types.int;
@ -138,7 +136,9 @@ in
description = "Forward tcp connection to destination ip:port"; description = "Forward tcp connection to destination ip:port";
}; };
}; };
});
default = [];
example = [ { sourcePort = 8080; destination = "10.0.0.1:80"; } ];
description = description =
'' ''
List of forwarded ports from the external interface to List of forwarded ports from the external interface to