mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-02 18:23:44 +00:00
nginx module: Add option to configure events block
This commit is contained in:
parent
f081a1aaf4
commit
54c5154b90
@ -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,12 +275,20 @@ 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 = "";
|
||||||
description = "
|
description = "
|
||||||
Configuration lines to be appended to the generated http block.
|
Configuration lines to be appended to the generated http block.
|
||||||
This is mutually exclusive with using config and httpConfig for
|
This is mutually exclusive with using config and httpConfig for
|
||||||
specifying the whole http block verbatim.
|
specifying the whole http block verbatim.
|
||||||
";
|
";
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user