diff options
author | talyz <kim.lindberger@gmail.com> | 2021-04-03 14:13:48 +0200 |
---|---|---|
committer | talyz <kim.lindberger@gmail.com> | 2021-04-04 13:44:36 +0200 |
commit | 46d935a4ce9f509ccb4792eca0261e872dd16e20 (patch) | |
tree | 6f8a2489b7350ad45caa69d238d715f9bb54843a /nixos | |
parent | 30cae53dbb1de9c3519da72fb36a1288da321b5b (diff) | |
download | nixpkgs-46d935a4ce9f509ccb4792eca0261e872dd16e20.tar nixpkgs-46d935a4ce9f509ccb4792eca0261e872dd16e20.tar.gz nixpkgs-46d935a4ce9f509ccb4792eca0261e872dd16e20.tar.bz2 nixpkgs-46d935a4ce9f509ccb4792eca0261e872dd16e20.tar.lz nixpkgs-46d935a4ce9f509ccb4792eca0261e872dd16e20.tar.xz nixpkgs-46d935a4ce9f509ccb4792eca0261e872dd16e20.tar.zst nixpkgs-46d935a4ce9f509ccb4792eca0261e872dd16e20.zip |
nixos/nginx: Add an option to specify additional third-party modules
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/services/web-servers/nginx/default.nix | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/nixos/modules/services/web-servers/nginx/default.nix b/nixos/modules/services/web-servers/nginx/default.nix index 6c8341c1115..750677f6165 100644 --- a/nixos/modules/services/web-servers/nginx/default.nix +++ b/nixos/modules/services/web-servers/nginx/default.nix @@ -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; |