Skip to content

Commit

Permalink
nixos/nsswitch: use symlinkJoin instead of makeLibaryPath to build sy…
Browse files Browse the repository at this point in the history
…stem.nssModules.path

This makes this point to a single folder, not a colon-separated list of
directories, which makes it much easier to symlink to it (what the
next commit does).

This makes overriding *already existing* NSS modules harder, as we can't
just pretend to the list, but it's probably a good idea to explicitly
handle this, instead of silently shadowing - plus, I'm not aware of
anything in nixpkgs actually overwriting existing NSS modules.
  • Loading branch information
flokli committed Sep 16, 2021
1 parent 105b9fc commit b5a813e
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions nixos/modules/config/nsswitch.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,18 @@ with lib;
internal = true;
default = [];
description = ''
Search path for NSS (Name Service Switch) modules. This allows
several DNS resolution methods to be specified via
Path containing NSS (Name Service Switch) modules.
This allows several DNS resolution methods to be specified via
<filename>/etc/nsswitch.conf</filename>.
'';
apply = list:
{
inherit list;
path = makeLibraryPath list;
path = pkgs.symlinkJoin
{
name = "nss-modules";
paths = list;
} + "/lib";
};
};

Expand Down

0 comments on commit b5a813e

Please sign in to comment.