From a4855047408261be2a2280f61ca9689bbbf742db Mon Sep 17 00:00:00 2001 From: Robin Gloster Date: Tue, 11 Jul 2017 21:59:40 +0200 Subject: [PATCH] config.users.ldap: do not include nss module if turned off --- nixos/modules/config/ldap.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nixos/modules/config/ldap.nix b/nixos/modules/config/ldap.nix index 1a5dbcd4e26..5b81d5c0c54 100644 --- a/nixos/modules/config/ldap.nix +++ b/nixos/modules/config/ldap.nix @@ -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";