diff options
author | makefu <github@syntax-fehler.de> | 2016-02-28 02:26:44 +0100 |
---|---|---|
committer | makefu <github@syntax-fehler.de> | 2016-02-28 02:26:44 +0100 |
commit | db72d5911f1556d3b1cfbe8f1a2d8f6765728952 (patch) | |
tree | ab12aafd2994c265cd4fd604e554b2e8db2da021 /krebs/3modules/nginx.nix | |
parent | 64a1dc64a3a7daf57e1ebc677e35c4dc89d9c36b (diff) | |
parent | 8c859335a879c515a1415bc8b15b5cb7eb519efc (diff) |
Merge remote-tracking branch 'cd/master'
Diffstat (limited to 'krebs/3modules/nginx.nix')
-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 = {}; }; }; |