nixos nat: add type for sourcePort and destination of forwardPorts

This commit is contained in:
Luca Bruno 2014-09-04 10:25:56 +02:00
parent 037b1cd0e9
commit e6ab680cbf

View File

@ -76,9 +76,19 @@ in
};
networking.nat.forwardPorts = mkOption {
type = types.listOf types.attrs;
type = types.listOf types.optionSet;
default = [];
example = [ { sourcePort = 8080; destination = "10.0.0.1:80"; } ];
options = {
sourcePort = mkOption {
type = types.int;
};
destination = mkOption {
type = types.str;
};
};
description =
''
List of forwarded ports from the external interface to