summary refs log tree commit diff
path: root/nixos/modules/services/networking/nat.nix
diff options
context:
space:
mode:
authorLuca Bruno <lethalman88@gmail.com>2014-09-04 10:25:56 +0200
committerLuca Bruno <lethalman88@gmail.com>2014-09-04 10:26:33 +0200
commite6ab680cbfb8165b51c829303b63eb44a905e751 (patch)
tree5527ea7bd663932eb0977ec497c088aa07a9f686 /nixos/modules/services/networking/nat.nix
parent037b1cd0e95840da429674478a57b07a869a7af0 (diff)
downloadnixpkgs-e6ab680cbfb8165b51c829303b63eb44a905e751.tar
nixpkgs-e6ab680cbfb8165b51c829303b63eb44a905e751.tar.gz
nixpkgs-e6ab680cbfb8165b51c829303b63eb44a905e751.tar.bz2
nixpkgs-e6ab680cbfb8165b51c829303b63eb44a905e751.tar.lz
nixpkgs-e6ab680cbfb8165b51c829303b63eb44a905e751.tar.xz
nixpkgs-e6ab680cbfb8165b51c829303b63eb44a905e751.tar.zst
nixpkgs-e6ab680cbfb8165b51c829303b63eb44a905e751.zip
nixos nat: add type for sourcePort and destination of forwardPorts
Diffstat (limited to 'nixos/modules/services/networking/nat.nix')
-rw-r--r--nixos/modules/services/networking/nat.nix12
1 files changed, 11 insertions, 1 deletions
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