diff options
author | tv <tv@krebsco.de> | 2016-02-27 17:23:59 +0100 |
---|---|---|
committer | tv <tv@krebsco.de> | 2016-02-27 17:23:59 +0100 |
commit | 8c859335a879c515a1415bc8b15b5cb7eb519efc (patch) | |
tree | 951f5b8534b0fc11704f4c5be6d0e1c0c44294e9 | |
parent | 9db6d9db717c6180ca3a0b3bcbf57d48c44ca855 (diff) |
krebs.nginx: s/optionSet/submodule/
-rw-r--r-- | krebs/3modules/nginx.nix | 53 |
1 files changed, 27 insertions, 26 deletions
diff --git a/krebs/3modules/nginx.nix b/krebs/3modules/nginx.nix index 7b7163071..ec39715d8 100644 --- a/krebs/3modules/nginx.nix +++ b/krebs/3modules/nginx.nix @@ -13,33 +13,34 @@ let enable = mkEnableOption "krebs.nginx"; servers = mkOption { - type = with types; attrsOf optionSet; - options = singleton { - server-names = mkOption { - type = with types; listOf str; - # TODO use identity - default = [ - "${config.networking.hostName}" - "${config.networking.hostName}.retiolum" - ]; + type = types.attrsOf (types.submodule { + options = { + server-names = mkOption { + type = with types; listOf str; + # TODO use identity + default = [ + "${config.networking.hostName}" + "${config.networking.hostName}.retiolum" + ]; + }; + listen = mkOption { + type = with types; either str (listOf str); + default = "80"; + apply = x: + if typeOf x != "list" + then [x] + else x; + }; + locations = mkOption { + type = with types; listOf (attrsOf str); + default = []; + }; + extraConfig = mkOption { + type = with types; string; + default = ""; + }; }; - listen = mkOption { - type = with types; either str (listOf str); - default = "80"; - apply = x: - if typeOf x != "list" - then [x] - else x; - }; - locations = mkOption { - type = with types; listOf (attrsOf str); - default = []; - }; - extraConfig = mkOption { - type = with types; string; - default = ""; - }; - }; + }); default = {}; }; }; |