From e6ab680cbfb8165b51c829303b63eb44a905e751 Mon Sep 17 00:00:00 2001 From: Luca Bruno Date: Thu, 4 Sep 2014 10:25:56 +0200 Subject: [PATCH] nixos nat: add type for sourcePort and destination of forwardPorts --- nixos/modules/services/networking/nat.nix | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/nixos/modules/services/networking/nat.nix b/nixos/modules/services/networking/nat.nix index b6fa3b79eb2..9ddd830a04a 100644 --- a/nixos/modules/services/networking/nat.nix +++ b/nixos/modules/services/networking/nat.nix @@ -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