config.users.ldap: do not include nss module if turned off

This commit is contained in:
Robin Gloster
2020-09-25 12:03:42 +02:00
committed by Linus Heckemann
parent 1179840f9a
commit a485504740
+2 -2
View File
@@ -240,9 +240,9 @@ in
'';
};
system.nssModules = singleton (
system.nssModules = mkIf cfg.nsswitch (singleton (
if cfg.daemon.enable then nss_pam_ldapd else nss_ldap
);
));
system.nssDatabases.group = optional cfg.nsswitch "ldap";
system.nssDatabases.passwd = optional cfg.nsswitch "ldap";