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

This commit is contained in:
talyz 2021-04-03 14:13:48 +02:00
parent 30cae53dbb
commit 46d935a4ce
No known key found for this signature in database
GPG key ID: 2DED2151F4671A2B

View file

@ -397,6 +397,9 @@ in
default = pkgs.nginxStable;
defaultText = "pkgs.nginxStable";
type = types.package;
apply = p: p.override {
modules = p.modules ++ cfg.additionalModules;
};
description = "
Nginx package to use. This defaults to the stable version. Note
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 {
default = "stderr";
type = types.str;