summary refs log tree commit diff
diff options
context:
space:
mode:
authorRobin Gloster <mail@glob.in>2016-08-09 11:59:10 +0000
committerRobin Gloster <mail@glob.in>2016-08-09 12:02:21 +0000
commitb0b0a45bb1277e77528a0216a0f697540ef659a6 (patch)
tree73fbbfb584fd45cf4c0f6cc9566112f17e15701a
parent199f5a2844cb31be96872599d8db7105b572f116 (diff)
downloadnixlib-b0b0a45bb1277e77528a0216a0f697540ef659a6.tar
nixlib-b0b0a45bb1277e77528a0216a0f697540ef659a6.tar.gz
nixlib-b0b0a45bb1277e77528a0216a0f697540ef659a6.tar.bz2
nixlib-b0b0a45bb1277e77528a0216a0f697540ef659a6.tar.lz
nixlib-b0b0a45bb1277e77528a0216a0f697540ef659a6.tar.xz
nixlib-b0b0a45bb1277e77528a0216a0f697540ef659a6.tar.zst
nixlib-b0b0a45bb1277e77528a0216a0f697540ef659a6.zip
nginx module: fix cfg.config backwards compatibility
fixes #17604
-rw-r--r--nixos/modules/services/web-servers/nginx/default.nix11
1 files changed, 7 insertions, 4 deletions
diff --git a/nixos/modules/services/web-servers/nginx/default.nix b/nixos/modules/services/web-servers/nginx/default.nix
index 8385d8e60266..2bd19f16a160 100644
--- a/nixos/modules/services/web-servers/nginx/default.nix
+++ b/nixos/modules/services/web-servers/nginx/default.nix
@@ -18,7 +18,7 @@ let
 
     ${cfg.config}
 
-    ${optionalString (cfg.httpConfig == "") ''
+    ${optionalString (cfg.httpConfig == "" && cfg.config == "") ''
     http {
       include ${cfg.package}/conf/mime.types;
       include ${cfg.package}/conf/fastcgi.conf;
@@ -233,9 +233,12 @@ in
       };
 
       config = mkOption {
-        default = "events {}";
+        default = "";
         description = "
           Verbatim nginx.conf configuration.
+          This is mutually exclusive with the structured configuration
+          via virtualHosts and the recommendedXyzSettings configuration
+          options. See appendConfig for appending to the generated http block.
         ";
       };
 
@@ -268,8 +271,8 @@ in
         default = "";
         description = "
           Configuration lines to be appended to the generated http block.
-          This is mutually exclusive with using httpConfig for specifying the whole
-          http block verbatim.
+          This is mutually exclusive with using config and httpConfig for 
+          specifying the whole http block verbatim.
         ";
       };