about summary refs log tree commit diff
path: root/nixos/modules/services/web-servers
diff options
context:
space:
mode:
authorShea Levy <shea@shealevy.com>2014-03-17 23:31:56 -0400
committerShea Levy <shea@shealevy.com>2014-03-17 23:31:56 -0400
commita1a167bc8bfd40616d6ad465b5c44337c7fee657 (patch)
treed7352672c0eebc8367d04c6c349066f1436b269a /nixos/modules/services/web-servers
parent4e6eae45ee8c2357acf3dc7e3caba9d86c2edeac (diff)
downloadnixlib-a1a167bc8bfd40616d6ad465b5c44337c7fee657.tar
nixlib-a1a167bc8bfd40616d6ad465b5c44337c7fee657.tar.gz
nixlib-a1a167bc8bfd40616d6ad465b5c44337c7fee657.tar.bz2
nixlib-a1a167bc8bfd40616d6ad465b5c44337c7fee657.tar.lz
nixlib-a1a167bc8bfd40616d6ad465b5c44337c7fee657.tar.xz
nixlib-a1a167bc8bfd40616d6ad465b5c44337c7fee657.tar.zst
nixlib-a1a167bc8bfd40616d6ad465b5c44337c7fee657.zip
nginx module: Enable modularly specifying servers
Diffstat (limited to 'nixos/modules/services/web-servers')
-rw-r--r--nixos/modules/services/web-servers/nginx/default.nix11
1 files changed, 11 insertions, 0 deletions
diff --git a/nixos/modules/services/web-servers/nginx/default.nix b/nixos/modules/services/web-servers/nginx/default.nix
index 1a39fe43bbee..621536133554 100644
--- a/nixos/modules/services/web-servers/nginx/default.nix
+++ b/nixos/modules/services/web-servers/nginx/default.nix
@@ -9,6 +9,11 @@ let
     user ${cfg.user} ${cfg.group};
     daemon off;
     ${cfg.config}
+    ${optionalString (cfg.httpConfig != "") ''
+    http {
+      ${cfg.httpConfig}
+    }
+    ''}
     ${cfg.appendConfig}
   '';
 in
@@ -51,6 +56,12 @@ in
         '';
       };
 
+      httpConfig = mkOption {
+        type = types.lines;
+        default = "";
+        description = "Configuration lines to be appended inside of the http {} block.";
+      };
+
       stateDir = mkOption {
         default = "/var/spool/nginx";
         description = "