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:
Kevin Cox
2022-12-26 15:47:51 -05:00
parent 04f574a1c0
commit 487b51e77c

View File

@@ -480,7 +480,7 @@ in
defaultText = literalExpression "pkgs.nginxStable";
type = types.package;
apply = p: p.override {
modules = p.modules ++ cfg.additionalModules;
modules = lib.unique (p.modules ++ cfg.additionalModules);
};
description = lib.mdDoc ''
Nginx package to use. This defaults to the stable version. Note