mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-20 08:29:20 +03:00
nixos/nginx: Deduplicate modules.
In most places in NixOS defining an option multiple places just merges the result together. This is particularly useful if you have two modules that both need an option, you don't want to have problems when they both set it. This makes the nginx `additionalModules` option follow this pattern.
This commit is contained in:
parent
04f574a1c0
commit
487b51e77c
1 changed files with 1 additions and 1 deletions
|
@ -480,7 +480,7 @@ in
|
||||||
defaultText = literalExpression "pkgs.nginxStable";
|
defaultText = literalExpression "pkgs.nginxStable";
|
||||||
type = types.package;
|
type = types.package;
|
||||||
apply = p: p.override {
|
apply = p: p.override {
|
||||||
modules = p.modules ++ cfg.additionalModules;
|
modules = lib.unique (p.modules ++ cfg.additionalModules);
|
||||||
};
|
};
|
||||||
description = lib.mdDoc ''
|
description = lib.mdDoc ''
|
||||||
Nginx package to use. This defaults to the stable version. Note
|
Nginx package to use. This defaults to the stable version. Note
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue