mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-27 01:13:05 +00:00
nsswitch.conf: Omit ldap unless ldap is enabled
This prevents programs from trying to find nss_ldap.
This commit is contained in:
parent
2ce047165a
commit
93902ea108
@ -8,6 +8,7 @@ let
|
||||
|
||||
inherit (config.services.avahi) nssmdns;
|
||||
inherit (config.services.samba) nsswins;
|
||||
ldap = config.users.ldap.enable;
|
||||
|
||||
in
|
||||
|
||||
@ -40,9 +41,9 @@ in
|
||||
# should define an option used by this module.
|
||||
environment.etc."nsswitch.conf".text =
|
||||
''
|
||||
passwd: files ldap
|
||||
group: files ldap
|
||||
shadow: files ldap
|
||||
passwd: files ${optionalString ldap "ldap"}
|
||||
group: files ${optionalString ldap "ldap"}
|
||||
shadow: files ${optionalString ldap "ldap"}
|
||||
hosts: files ${optionalString nssmdns "mdns_minimal [NOTFOUND=return]"} dns ${optionalString nssmdns "mdns"} ${optionalString nsswins "wins"} myhostname mymachines
|
||||
networks: files dns
|
||||
ethers: files
|
||||
|
Loading…
Reference in New Issue
Block a user