mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-19 11:23:29 +00:00
Merge pull request #182080 from danc86/openldap-sysconfdir
This commit is contained in:
commit
b435482234
@ -13,10 +13,17 @@ let
|
||||
objectClass: organizationalUnit
|
||||
ou: users
|
||||
'';
|
||||
ldapClientConfig = {
|
||||
enable = true;
|
||||
loginPam = false;
|
||||
nsswitch = false;
|
||||
server = "ldap://";
|
||||
base = "dc=example";
|
||||
};
|
||||
testScript = ''
|
||||
machine.wait_for_unit("openldap.service")
|
||||
machine.succeed(
|
||||
'ldapsearch -LLL -D "cn=root,dc=example" -w notapassword -b "dc=example"',
|
||||
'ldapsearch -LLL -D "cn=root,dc=example" -w notapassword',
|
||||
)
|
||||
'';
|
||||
in {
|
||||
@ -57,6 +64,7 @@ in {
|
||||
};
|
||||
declarativeContents."dc=example" = dbContents;
|
||||
};
|
||||
users.ldap = ldapClientConfig;
|
||||
};
|
||||
}) { inherit pkgs system; };
|
||||
|
||||
@ -76,6 +84,7 @@ in {
|
||||
rootpw = "notapassword";
|
||||
declarativeContents."dc=example" = dbContents;
|
||||
};
|
||||
users.ldap = ldapClientConfig;
|
||||
};
|
||||
}) { inherit system pkgs; };
|
||||
|
||||
@ -88,6 +97,7 @@ in {
|
||||
enable = true;
|
||||
configDir = "/var/db/slapd.d";
|
||||
};
|
||||
users.ldap = ldapClientConfig;
|
||||
};
|
||||
|
||||
testScript = let
|
||||
|
@ -97,7 +97,7 @@ stdenv.mkDerivation rec {
|
||||
"CC=${stdenv.cc.targetPrefix}cc"
|
||||
"STRIP=" # Disable install stripping as it breaks cross-compiling. We strip binaries anyway in fixupPhase.
|
||||
"prefix=${placeholder "out"}"
|
||||
"sysconfdir=${placeholder "out"}/etc"
|
||||
"sysconfdir=/etc"
|
||||
"systemdsystemunitdir=${placeholder "out"}/lib/systemd/system"
|
||||
# contrib modules require these
|
||||
"moduledir=${placeholder "out"}/lib/modules"
|
||||
@ -134,6 +134,7 @@ stdenv.mkDerivation rec {
|
||||
|
||||
installFlags = [
|
||||
"prefix=${placeholder "out"}"
|
||||
"sysconfdir=${placeholder "out"}/etc"
|
||||
"moduledir=${placeholder "out"}/lib/modules"
|
||||
"INSTALL=install"
|
||||
];
|
||||
|
Loading…
Reference in New Issue
Block a user