From c3bdee3c397598a93276a52bd6bdc495fef18cb0 Mon Sep 17 00:00:00 2001 From: Eric Sagnes Date: Sun, 11 Sep 2016 18:05:05 +0900 Subject: [PATCH] nat module: optionSet -> submodule --- nixos/modules/services/networking/nat.nix | 30 +++++++++++------------ 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/nixos/modules/services/networking/nat.nix b/nixos/modules/services/networking/nat.nix index 9d163e60d5e..a0cfc8f8fb9 100644 --- a/nixos/modules/services/networking/nat.nix +++ b/nixos/modules/services/networking/nat.nix @@ -122,23 +122,23 @@ in }; networking.nat.forwardPorts = mkOption { - type = types.listOf types.optionSet; + type = with types; listOf (submodule { + options = { + sourcePort = mkOption { + type = types.int; + example = 8080; + description = "Source port of the external interface"; + }; + + destination = mkOption { + type = types.str; + example = "10.0.0.1:80"; + description = "Forward tcp connection to destination ip:port"; + }; + }; + }); default = []; example = [ { sourcePort = 8080; destination = "10.0.0.1:80"; } ]; - options = { - sourcePort = mkOption { - type = types.int; - example = 8080; - description = "Source port of the external interface"; - }; - - destination = mkOption { - type = types.str; - example = "10.0.0.1:80"; - description = "Forward tcp connection to destination ip:port"; - }; - }; - description = '' List of forwarded ports from the external interface to