diff options
Diffstat (limited to 'modules/private/databases/openldap')
-rw-r--r-- | modules/private/databases/openldap/default.nix | 35 | ||||
-rw-r--r-- | modules/private/databases/openldap/eldiron_schemas.nix | 8 |
2 files changed, 22 insertions, 21 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 | ''; |
37 | in | 24 | in |
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 | } |
diff --git a/modules/private/databases/openldap/eldiron_schemas.nix b/modules/private/databases/openldap/eldiron_schemas.nix index fc686dd..cf45ebe 100644 --- a/modules/private/databases/openldap/eldiron_schemas.nix +++ b/modules/private/databases/openldap/eldiron_schemas.nix | |||
@@ -9,10 +9,10 @@ let | |||
9 | sha256 = "11bjf5zfvqlim7p9vddcafs0wiq3v8ys77x8h6fbp9c6bdfh0awh"; | 9 | sha256 = "11bjf5zfvqlim7p9vddcafs0wiq3v8ys77x8h6fbp9c6bdfh0awh"; |
10 | }; | 10 | }; |
11 | schemas = [ | 11 | schemas = [ |
12 | "${openldap}/etc/schema/core.schema" | 12 | #"${openldap}/etc/schema/core.schema" |
13 | "${openldap}/etc/schema/cosine.schema" | 13 | #"${openldap}/etc/schema/cosine.schema" |
14 | "${openldap}/etc/schema/inetorgperson.schema" | 14 | #"${openldap}/etc/schema/inetorgperson.schema" |
15 | "${openldap}/etc/schema/nis.schema" | 15 | #"${openldap}/etc/schema/nis.schema" |
16 | puppetSchema | 16 | puppetSchema |
17 | kerberosSchema | 17 | kerberosSchema |
18 | ./immae.schema | 18 | ./immae.schema |