NixOS configuration for HPC cluster https://docs.hpc.informatik.hs-fulda.de/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

43 lines
1.3 KiB

1 year ago
  1. { config, ... }:
  2. {
  3. services.openldap = {
  4. enable = true;
  5. settings = {
  6. children = {
  7. "cn=schema".includes = [
  8. "${config.services.openldap.package}/etc/schema/core.ldif"
  9. "${config.services.openldap.package}/etc/schema/cosine.ldif"
  10. "${config.services.openldap.package}/etc/schema/inetorgperson.ldif"
  11. "${config.services.openldap.package}/etc/schema/nis.ldif"
  12. ];
  13. "olcDatabase={1}mdb" = {
  14. attrs = {
  15. objectClass = [ "olcDatabaseConfig" "olcMdbConfig" ];
  16. olcDatabase = "{1}mdb";
  17. olcDbDirectory = "/var/lib/openldap/db";
  18. olcSuffix = "dc=sc,dc=informatik,dc=hs-fulda,dc=de";
  19. olcRootDN = "cn=root,dc=sc,dc=informatik,dc=hs-fulda,dc=de";
  20. olcRootPW.path = config.sops.secrets."ldap/root/password".path;
  21. olcAccess = [
  22. # Custom access rules for userPassword attributes
  23. ''{0}to attrs=userPassword
  24. by self write
  25. by anonymous auth
  26. by * none''
  27. # Allow read on anything else
  28. ''{1}to *
  29. by * read''
  30. ];
  31. };
  32. };
  33. };
  34. };
  35. };
  36. sops.secrets."ldap/root/password" = { };
  37. }