diff options
author | Kevin Cox <kevincox@kevincox.ca> | 2022-12-26 15:47:51 -0500 |
---|---|---|
committer | Kevin Cox <kevincox@kevincox.ca> | 2022-12-26 15:47:51 -0500 |
commit | 487b51e77c35a683ca99206a12478f9957a6e942 (patch) | |
tree | e0b29117016c4c29b56c8ba9a35bed113837d8c7 /nixos/modules/services/web-servers/nginx/default.nix | |
parent | 04f574a1c0fde90b51bf68198e2297ca4e7cccf4 (diff) | |
download | nixlib-487b51e77c35a683ca99206a12478f9957a6e942.tar nixlib-487b51e77c35a683ca99206a12478f9957a6e942.tar.gz nixlib-487b51e77c35a683ca99206a12478f9957a6e942.tar.bz2 nixlib-487b51e77c35a683ca99206a12478f9957a6e942.tar.lz nixlib-487b51e77c35a683ca99206a12478f9957a6e942.tar.xz nixlib-487b51e77c35a683ca99206a12478f9957a6e942.tar.zst nixlib-487b51e77c35a683ca99206a12478f9957a6e942.zip |
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.
Diffstat (limited to 'nixos/modules/services/web-servers/nginx/default.nix')
-rw-r--r-- | nixos/modules/services/web-servers/nginx/default.nix | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/nixos/modules/services/web-servers/nginx/default.nix b/nixos/modules/services/web-servers/nginx/default.nix index 85c76ed59d66..09e7c5c894ae 100644 --- a/nixos/modules/services/web-servers/nginx/default.nix +++ b/nixos/modules/services/web-servers/nginx/default.nix @@ -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 |