about summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorDomen Kožar <domen@dev.si>2015-01-25 21:15:22 +0100
committerDomen Kožar <domen@dev.si>2015-01-25 21:15:29 +0100
commit2daba83828fc09cfa52ca416c1af5ae44155d034 (patch)
tree000baad7ac2011d6d705f923f753c5d5ff51481c /nixos
parent6308cba3faa637c385c865bc96cbe7b68a75e84f (diff)
downloadnixlib-2daba83828fc09cfa52ca416c1af5ae44155d034.tar
nixlib-2daba83828fc09cfa52ca416c1af5ae44155d034.tar.gz
nixlib-2daba83828fc09cfa52ca416c1af5ae44155d034.tar.bz2
nixlib-2daba83828fc09cfa52ca416c1af5ae44155d034.tar.lz
nixlib-2daba83828fc09cfa52ca416c1af5ae44155d034.tar.xz
nixlib-2daba83828fc09cfa52ca416c1af5ae44155d034.tar.zst
nixlib-2daba83828fc09cfa52ca416c1af5ae44155d034.zip
openldap: add example config
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/services/databases/openldap.nix16
1 files changed, 16 insertions, 0 deletions
diff --git a/nixos/modules/services/databases/openldap.nix b/nixos/modules/services/databases/openldap.nix
index eae4c114fc12..2e1b9049b7ac 100644
--- a/nixos/modules/services/databases/openldap.nix
+++ b/nixos/modules/services/databases/openldap.nix
@@ -24,6 +24,22 @@ in
         description = "
           Whether to enable the ldap server.
         ";
+        example = literalExample ''
+          openldap.enable = true;
+          openldap.extraConfig = '''
+            include ''${pkgs.openldap}/etc/openldap/schema/core.schema
+            include ''${pkgs.openldap}/etc/openldap/schema/cosine.schema
+            include ''${pkgs.openldap}/etc/openldap/schema/inetorgperson.schema
+            include ''${pkgs.openldap}/etc/openldap/schema/nis.schema
+
+            database bdb 
+            suffix dc=example,dc=org 
+            rootdn cn=admin,dc=example,dc=org 
+            # NOTE: change after first start
+            rootpw secret
+            directory /var/run/slapd
+          ''';
+        '';
       };
 
       user = mkOption {