nixos/nginx: Add an option to specify additional third-party modules

This commit is contained in:
talyz
2021-04-04 13:44:36 +02:00
parent 30cae53dbb
commit 46d935a4ce
@@ -397,6 +397,9 @@ in
default = pkgs.nginxStable; default = pkgs.nginxStable;
defaultText = "pkgs.nginxStable"; defaultText = "pkgs.nginxStable";
type = types.package; type = types.package;
apply = p: p.override {
modules = p.modules ++ cfg.additionalModules;
};
description = " description = "
Nginx package to use. This defaults to the stable version. Note Nginx package to use. This defaults to the stable version. Note
that the nginx team recommends to use the mainline version which that the nginx team recommends to use the mainline version which
@@ -404,6 +407,17 @@ in
"; ";
}; };
additionalModules = mkOption {
default = [];
type = types.listOf (types.attrsOf types.anything);
example = literalExample "[ pkgs.nginxModules.brotli ]";
description = ''
Additional <link xlink:href="https://www.nginx.com/resources/wiki/modules/">third-party nginx modules</link>
to install. Packaged modules are available in
<literal>pkgs.nginxModules</literal>.
'';
};
logError = mkOption { logError = mkOption {
default = "stderr"; default = "stderr";
type = types.str; type = types.str;