migrate to new openldap module syntax
This commit is contained in:
parent
59cb44261d
commit
e985a277b3
23
flake.nix
23
flake.nix
|
@ -851,17 +851,21 @@
|
||||||
machine = { pkgs, ... }: {
|
machine = { pkgs, ... }: {
|
||||||
imports = [ hydraServer ];
|
imports = [ hydraServer ];
|
||||||
|
|
||||||
services.openldap = {
|
services.openldap.enable = true;
|
||||||
enable = true;
|
services.openldap.settings.children = {
|
||||||
suffix = "dc=example";
|
"olcDatabase={1}mdb".attrs = {
|
||||||
rootdn = "cn=root,dc=example";
|
objectClass = [ "olcDatabaseConfig" "olcMdbConfig" ];
|
||||||
rootpw = "notapassword";
|
database = "{1}mdbg";
|
||||||
database = "bdb";
|
olcSuffix = "dc=example";
|
||||||
dataDir = "/var/lib/openldap";
|
olcRootDN = "cn=root,dc=example";
|
||||||
|
olcRootPW = "notapassword";
|
||||||
|
olcDbDirectory = "/var/lib/openldap";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
# userPassword generated via `slappasswd`
|
# userPassword generated via `slappasswd`
|
||||||
# The admin user has the password `password` and `user` has the password `foobar`.
|
# The admin user has the password `password` and `user` has the password `foobar`.
|
||||||
declarativeContents."dc=example" = ''
|
services.openldap.declarativeContents."dc=example" = ''
|
||||||
dn: dc=example
|
dn: dc=example
|
||||||
dc: example
|
dc: example
|
||||||
o: Root
|
o: Root
|
||||||
|
@ -903,8 +907,7 @@
|
||||||
mail: admin@example
|
mail: admin@example
|
||||||
userPassword: {SSHA}BsgOQcRnoiULzwLrGmuzVGH6EC5Dkwmf
|
userPassword: {SSHA}BsgOQcRnoiULzwLrGmuzVGH6EC5Dkwmf
|
||||||
'';
|
'';
|
||||||
};
|
systemd.services.hydra-server.environment.CATALYST_DEBUG = "1";
|
||||||
systemd.services.hdyra-server.environment.CATALYST_DEBUG = "1";
|
|
||||||
systemd.services.hydra-server.environment.HYDRA_LDAP_CONFIG = pkgs.writeText "config.yaml"
|
systemd.services.hydra-server.environment.HYDRA_LDAP_CONFIG = pkgs.writeText "config.yaml"
|
||||||
# example config based on https://metacpan.org/source/ILMARI/Catalyst-Authentication-Store-LDAP-1.016/README#L103
|
# example config based on https://metacpan.org/source/ILMARI/Catalyst-Authentication-Store-LDAP-1.016/README#L103
|
||||||
''
|
''
|
||||||
|
|
Loading…
Reference in a new issue