mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-26 04:43:09 +03:00
Merge pull request #18961 from wlhlm/nginx-events
Allow configuration of events{} block in nginx module
This commit is contained in:
commit
ff980cc553
@ -18,9 +18,13 @@ let
|
||||
|
||||
${cfg.config}
|
||||
|
||||
${optionalString (cfg.httpConfig == "" && cfg.config == "") ''
|
||||
events {}
|
||||
${optionalString (cfg.eventsConfig != "" || cfg.config == "") ''
|
||||
events {
|
||||
${cfg.eventsConfig}
|
||||
}
|
||||
''}
|
||||
|
||||
${optionalString (cfg.httpConfig == "" && cfg.config == "") ''
|
||||
http {
|
||||
include ${cfg.package}/conf/mime.types;
|
||||
include ${cfg.package}/conf/fastcgi.conf;
|
||||
@ -98,7 +102,6 @@ let
|
||||
}''}
|
||||
|
||||
${optionalString (cfg.httpConfig != "") ''
|
||||
events {}
|
||||
http {
|
||||
include ${cfg.package}/conf/mime.types;
|
||||
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 {
|
||||
type = types.lines;
|
||||
default = "";
|
||||
|
Loading…
Reference in New Issue
Block a user