summary refs log tree commit diff
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
parent54e9ee81a4cba4b81d42745ff5482707c04f4055 (diff)
parenta4855047408261be2a2280f61ca9689bbbf742db (diff)
downloadnixpkgs-f448ec33655c48d7306456bee77f3cdabf3757fa.tar
nixpkgs-f448ec33655c48d7306456bee77f3cdabf3757fa.tar.gz
nixpkgs-f448ec33655c48d7306456bee77f3cdabf3757fa.tar.bz2
nixpkgs-f448ec33655c48d7306456bee77f3cdabf3757fa.tar.lz
nixpkgs-f448ec33655c48d7306456bee77f3cdabf3757fa.tar.xz
nixpkgs-f448ec33655c48d7306456bee77f3cdabf3757fa.tar.zst
nixpkgs-f448ec33655c48d7306456bee77f3cdabf3757fa.zip
Merge pull request #98731 from mayflower/ldap-nss-optional
config.users.ldap: do not include nss module if turned off
-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 e63f8c0d43e..35813c168fd 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";