Use system's nsswitch on non-NixOS

I have a machine that uses nsswitch to fetch NIS users (I don’t really know much more than that). I would like to point the Nix glibc to the /etc/nsswitch.conf file, and not the one provided by Nix, in order to communicate with the NIS.

How would one do something like that ?

NixOS solves this problem by using nscd. If you install your distro’s nscd, it should respect /etc/nssswitch, and nixpkgs-provided binaries will automatically use nscd if available.

1 Like