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.avahi) nssmdns;
|
||||||
inherit (config.services.samba) nsswins;
|
inherit (config.services.samba) nsswins;
|
||||||
|
ldap = config.users.ldap.enable;
|
||||||
|
|
||||||
in
|
in
|
||||||
|
|
||||||
@ -40,9 +41,9 @@ in
|
|||||||
# should define an option used by this module.
|
# should define an option used by this module.
|
||||||
environment.etc."nsswitch.conf".text =
|
environment.etc."nsswitch.conf".text =
|
||||||
''
|
''
|
||||||
passwd: files ldap
|
passwd: files ${optionalString ldap "ldap"}
|
||||||
group: files ldap
|
group: files ${optionalString ldap "ldap"}
|
||||||
shadow: files ldap
|
shadow: files ${optionalString ldap "ldap"}
|
||||||
hosts: files ${optionalString nssmdns "mdns_minimal [NOTFOUND=return]"} dns ${optionalString nssmdns "mdns"} ${optionalString nsswins "wins"} myhostname mymachines
|
hosts: files ${optionalString nssmdns "mdns_minimal [NOTFOUND=return]"} dns ${optionalString nssmdns "mdns"} ${optionalString nsswins "wins"} myhostname mymachines
|
||||||
networks: files dns
|
networks: files dns
|
||||||
ethers: files
|
ethers: files
|
||||||
|
Loading…
x
Reference in New Issue
Block a user