Merge pull request #18961 from wlhlm/nginx-events

Allow configuration of events{} block in nginx module
This commit is contained in:
zimbatm 2016-09-26 13:41:54 +01:00 committed by GitHub
commit ff980cc553

View File

@ -18,9 +18,13 @@ let
${cfg.config} ${cfg.config}
${optionalString (cfg.httpConfig == "" && cfg.config == "") '' ${optionalString (cfg.eventsConfig != "" || cfg.config == "") ''
events {} events {
${cfg.eventsConfig}
}
''}
${optionalString (cfg.httpConfig == "" && cfg.config == "") ''
http { http {
include ${cfg.package}/conf/mime.types; include ${cfg.package}/conf/mime.types;
include ${cfg.package}/conf/fastcgi.conf; include ${cfg.package}/conf/fastcgi.conf;
@ -98,7 +102,6 @@ let
}''} }''}
${optionalString (cfg.httpConfig != "") '' ${optionalString (cfg.httpConfig != "") ''
events {}
http { http {
include ${cfg.package}/conf/mime.types; include ${cfg.package}/conf/mime.types;
include ${cfg.package}/conf/fastcgi.conf; include ${cfg.package}/conf/fastcgi.conf;
@ -272,6 +275,14 @@ in
"; ";
}; };
eventsConfig = mkOption {
type = types.lines;
default = "";
description = ''
Configuration lines to be set inside the events block.
'';
};
appendHttpConfig = mkOption { appendHttpConfig = mkOption {
type = types.lines; type = types.lines;
default = ""; default = "";