aboutsummaryrefslogtreecommitdiff
path: root/modules/private/databases/openldap/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'modules/private/databases/openldap/default.nix')
-rw-r--r--modules/private/databases/openldap/default.nix35
1 files changed, 18 insertions, 17 deletions
diff --git a/modules/private/databases/openldap/default.nix b/modules/private/databases/openldap/default.nix
index d7d61db..efe9379 100644
--- a/modules/private/databases/openldap/default.nix
+++ b/modules/private/databases/openldap/default.nix
@@ -12,27 +12,14 @@ let
12 moduleload back_hdb 12 moduleload back_hdb
13 backend hdb 13 backend hdb
14 14
15 moduleload memberof 15 TLSCertificateFile ${config.security.acme.certs.ldap.directory}/cert.pem
16 database hdb 16 TLSCertificateKeyFile ${config.security.acme.certs.ldap.directory}/key.pem
17 suffix "${cfg.baseDn}" 17 TLSCACertificateFile ${config.security.acme.certs.ldap.directory}/fullchain.pem
18 rootdn "${cfg.rootDn}"
19 include ${config.secrets.location}/ldap/password
20 directory ${cfg.dataDir}
21 overlay memberof
22
23 moduleload syncprov
24 overlay syncprov
25 syncprov-checkpoint 100 10
26
27 TLSCertificateFile ${config.security.acme2.certs.ldap.directory}/cert.pem
28 TLSCertificateKeyFile ${config.security.acme2.certs.ldap.directory}/key.pem
29 TLSCACertificateFile ${config.security.acme2.certs.ldap.directory}/fullchain.pem
30 TLSCACertificatePath ${pkgs.cacert.unbundled}/etc/ssl/certs/ 18 TLSCACertificatePath ${pkgs.cacert.unbundled}/etc/ssl/certs/
31 #This makes openldap crash 19 #This makes openldap crash
32 #TLSCipherSuite DEFAULT 20 #TLSCipherSuite DEFAULT
33 21
34 sasl-host kerberos.immae.eu 22 sasl-host kerberos.immae.eu
35 include ${config.secrets.location}/ldap/access
36 ''; 23 '';
37in 24in
38{ 25{
@@ -117,7 +104,7 @@ in
117 users.users.openldap.extraGroups = [ "keys" ]; 104 users.users.openldap.extraGroups = [ "keys" ];
118 networking.firewall.allowedTCPPorts = [ 636 389 ]; 105 networking.firewall.allowedTCPPorts = [ 636 389 ];
119 106
120 security.acme2.certs."ldap" = config.myServices.databasesCerts // { 107 security.acme.certs."ldap" = config.myServices.databasesCerts // {
121 user = "openldap"; 108 user = "openldap";
122 group = "openldap"; 109 group = "openldap";
123 plugins = [ "fullchain.pem" "key.pem" "cert.pem" "account_key.json" "account_reg.json" ]; 110 plugins = [ "fullchain.pem" "key.pem" "cert.pem" "account_key.json" "account_reg.json" ];
@@ -137,6 +124,20 @@ in
137 dataDir = cfg.dataDir; 124 dataDir = cfg.dataDir;
138 urlList = [ "ldap://" "ldaps://" ]; 125 urlList = [ "ldap://" "ldaps://" ];
139 extraConfig = ldapConfig; 126 extraConfig = ldapConfig;
127 extraDatabaseConfig = ''
128 moduleload memberof
129 overlay memberof
130
131 moduleload syncprov
132 overlay syncprov
133 syncprov-checkpoint 100 10
134
135 include ${config.secrets.location}/ldap/access
136 '';
137 rootpwFile = "${config.secrets.location}/ldap/password";
138 suffix = cfg.baseDn;
139 rootdn = cfg.rootDn;
140 database = "hdb";
140 }; 141 };
141 }; 142 };
142} 143}