Skip to content

Commit d1eb62a

Browse files
committed
eve/openldap: adapt to new module syntax
1 parent c57c92c commit d1eb62a

1 file changed

Lines changed: 22 additions & 26 deletions

File tree

nixos/modules/openldap/default.nix

Lines changed: 22 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@
33
services.openldap = {
44
enable = true;
55

6-
defaultSchemas = null;
7-
dataDir = null;
8-
database = null;
96
settings.attrs.olcLogLevel = "0";
107

118
settings.children = {
@@ -16,29 +13,28 @@
1613
"${pkgs.openldap}/etc/schema/nis.ldif"
1714
];
1815

19-
"olcDatabase={1}mdb" = {
20-
attrs = {objectClass = [ "olcDatabaseConfig" "olcMdbConfig" ];
21-
olcDatabase = "{1}mdb";
22-
olcDbDirectory = "/var/db/openldap";
23-
olcRootPW.path = config.sops.secrets.openldap-rootpw.path;
24-
olcRootDN = "cn=admin,dc=eve";
25-
olcSuffix = "dc=eve";
26-
olcAccess = [
27-
''{0}to attrs=userPassword
28-
by self write by anonymous auth
29-
by dn.base="cn=dovecot,dc=mail,dc=eve" read
30-
by dn.base="cn=gitlab,ou=system,ou=users,dc=eve" read
31-
by dn.base="cn=ldapsync,ou=system,ou=users,dc=eve"
32-
read by * none''
33-
''{1}to attrs=loginShell by self write by * read''
34-
''{2}to dn.subtree="ou=system,ou=users,dc=eve"
35-
by dn.base="cn=dovecot,dc=mail,dc=eve" read
36-
by dn.subtree="ou=system,ou=users,dc=eve" read
37-
by * none''
38-
''{3}to dn.subtree="ou=jabber,ou=users,dc=eve" by dn.base="cn=prosody,ou=system,ou=users,dc=eve" write by * read''
39-
''{4}to * by * read''
40-
];
41-
};
16+
"olcDatabase={1}mdb".attrs = {
17+
objectClass = [ "olcDatabaseConfig" "olcMdbConfig" ];
18+
olcDatabase = "{1}mdb";
19+
olcDbDirectory = "/var/db/openldap";
20+
olcRootPW.path = config.sops.secrets.openldap-rootpw.path;
21+
olcRootDN = "cn=admin,dc=eve";
22+
olcSuffix = "dc=eve";
23+
olcAccess = [
24+
''{0}to attrs=userPassword
25+
by self write by anonymous auth
26+
by dn.base="cn=dovecot,dc=mail,dc=eve" read
27+
by dn.base="cn=gitlab,ou=system,ou=users,dc=eve" read
28+
by dn.base="cn=ldapsync,ou=system,ou=users,dc=eve"
29+
read by * none''
30+
''{1}to attrs=loginShell by self write by * read''
31+
''{2}to dn.subtree="ou=system,ou=users,dc=eve"
32+
by dn.base="cn=dovecot,dc=mail,dc=eve" read
33+
by dn.subtree="ou=system,ou=users,dc=eve" read
34+
by * none''
35+
''{3}to dn.subtree="ou=jabber,ou=users,dc=eve" by dn.base="cn=prosody,ou=system,ou=users,dc=eve" write by * read''
36+
''{4}to * by * read''
37+
];
4238
};
4339
"olcOverlay=syncprov,olcDatabase={1}mdb".attrs = {
4440
objectClass = [ "olcOverlayConfig" "olcSyncProvConfig" ];

0 commit comments

Comments
 (0)