diff options
author | makefu <github@syntax-fehler.de> | 2015-10-21 18:47:26 +0200 |
---|---|---|
committer | makefu <github@syntax-fehler.de> | 2015-10-21 18:47:26 +0200 |
commit | 8b007dceb58f7f1c6738b55e62f9f70cdabc07bc (patch) | |
tree | acd013bc91e889e2924fae0486a8f83843f0cc99 /3modules | |
parent | 96ed20e15dd1c73aa97b4423a69fe6405d71826e (diff) |
m 3 tinc_graphs: merge instead of override nginx config
Diffstat (limited to '3modules')
-rw-r--r-- | 3modules/tinc_graphs.nix | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/3modules/tinc_graphs.nix b/3modules/tinc_graphs.nix index 42b08d62a..1f87f00cc 100644 --- a/3modules/tinc_graphs.nix +++ b/3modules/tinc_graphs.nix @@ -31,6 +31,7 @@ let }; listen = mkOption { + # use the type of the nginx listen option type = with types; listOf str; description = "listen address for anonymous graphs"; default = [ "80" ]; @@ -120,23 +121,23 @@ let createHome = true; }; - krebs.nginx.servers = mkIf cfg.krebsNginx.enable { - tinc_graphs_complete = cfg.nginx.complete { + krebs.nginx.servers = mkIf cfg.nginx.enable { + tinc_graphs_complete = mkMerge [ cfg.nginx.complete { locations = [ (nameValuePair "/" '' autoindex on; root ${internal_dir}; '') ]; - }; - tinc_graphs_anonymous = cfg.nginx.anonymous // { + }] ; + tinc_graphs_anonymous = mkMerge [ cfg.nginx.anonymous { locations = [ (nameValuePair "/" '' autoindex on; root ${external_dir}; '') ]; - }; + }]; }; }; |