summaryrefslogtreecommitdiffstats
path: root/nixos/modules
diff options
context:
space:
mode:
authorLinus Heckemann <git@sphalerite.org>2020-12-12 10:53:39 +0100
committerGitHub <noreply@github.com>2020-12-12 10:53:39 +0100
commitf448ec33655c48d7306456bee77f3cdabf3757fa (patch)
treee4887c92ddf37d4f7ed5d2e8bf10dcef7ae0ce91 /nixos/modules
parent54e9ee81a4cba4b81d42745ff5482707c04f4055 (diff)
parenta4855047408261be2a2280f61ca9689bbbf742db (diff)
Merge pull request #98731 from mayflower/ldap-nss-optional
config.users.ldap: do not include nss module if turned off
Diffstat (limited to 'nixos/modules')
-rw-r--r--nixos/modules/config/ldap.nix4
1 files changed, 2 insertions, 2 deletions
diff --git a/nixos/modules/config/ldap.nix b/nixos/modules/config/ldap.nix
index e63f8c0d43e7..35813c168fd8 100644
--- a/nixos/modules/config/ldap.nix
+++ b/nixos/modules/config/ldap.nix
@@ -238,9 +238,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";