ldap: Add option for NSS integration
commit07c44b81c3c50ac55fdde82aa7a761aa6e758fd6
authorMarkus Mueller <john.subscriber@markus.institute>
dateMon 18 Jul 2016, 13:24 (10 years ago)
parente04c350
nixos/modules/config/ldap.nix+6
@@ -68,6 +68,12 @@ in
6868 description = "Whether to include authentication against LDAP in login PAM";
6969 };
7070
71+ nsswitch = mkOption {
72+ type = types.bool;
73+ default = true;
74+ description = "Whether to include lookup against LDAP in NSS";
75+ };
76+
7177 server = mkOption {
7278 example = "ldap://ldap.example.org/";
7379 description = "The URL of the LDAP server.";
nixos/modules/config/nsswitch.nix+1−1
@@ -8,7 +8,7 @@ let
88
99 inherit (config.services.avahi) nssmdns;
1010 inherit (config.services.samba) nsswins;
11− ldap = config.users.ldap.enable;
11+ ldap = (config.users.ldap.enable && config.users.ldap.nsswitch);
1212
1313in
1414