nginx module: Enable modularly specifying servers

Shea Levy a1a167bc 4e6eae45

+11
+11
nixos/modules/services/web-servers/nginx/default.nix
··· 9 9 user ${cfg.user} ${cfg.group}; 10 10 daemon off; 11 11 ${cfg.config} 12 + ${optionalString (cfg.httpConfig != "") '' 13 + http { 14 + ${cfg.httpConfig} 15 + } 16 + ''} 12 17 ${cfg.appendConfig} 13 18 ''; 14 19 in ··· 49 54 concatenated (contrary to <option>config</option> which 50 55 can be set only once). 51 56 ''; 57 + }; 58 + 59 + httpConfig = mkOption { 60 + type = types.lines; 61 + default = ""; 62 + description = "Configuration lines to be appended inside of the http {} block."; 52 63 }; 53 64 54 65 stateDir = mkOption {