about summary refs log tree commit diff
path: root/nixos/tests/openldap.nix
diff options
context:
space:
mode:
authorKai Wohlfahrt <kai.wohlfahrt@gmail.com>2020-09-27 21:50:25 +0100
committerKai Wohlfahrt <kai.wohlfahrt@gmail.com>2020-11-21 16:13:03 +0000
commitfefc26f8449aba4d66a70f600932c9306f4db60b (patch)
tree8e7e9ed494b609297eec32c889b8bff10a9aedaa /nixos/tests/openldap.nix
parentce1acd97a7162094accfb764cb1d33159dc5165f (diff)
nixos/openldap: use mkRenamedOptionModule
This offers less helpful warnings, but makes the implementation
considerably more straightforward.
Diffstat (limited to 'nixos/tests/openldap.nix')
-rw-r--r--nixos/tests/openldap.nix15
1 files changed, 6 insertions, 9 deletions
diff --git a/nixos/tests/openldap.nix b/nixos/tests/openldap.nix
index beaff91647446..ac1e1a7596f20 100644
--- a/nixos/tests/openldap.nix
+++ b/nixos/tests/openldap.nix
@@ -24,9 +24,6 @@ in {
       environment.etc."openldap/root_password".text = "notapassword";
       services.openldap = {
         enable = true;
-        defaultSchemas = null;
-        dataDir = null;
-        database = null;
         settings = {
           children = {
             "cn=schema" = {
@@ -61,17 +58,21 @@ in {
   };
 
   # Old-style configuration
-  shortOptions = import ./make-test-python.nix {
+  oldOptions = import ./make-test-python.nix {
     inherit testScript;
     name = "openldap";
 
     machine = { pkgs, ... }: {
       services.openldap = {
         enable = true;
+        logLevel = "stats acl";
+        defaultSchemas = true;
+        database = "mdb";
         suffix = "dc=example";
         rootdn = "cn=root,dc=example";
         rootpw = "notapassword";
-        declarativeContents = dbContents;
+        dataDir = "/var/db/openldap";
+        declarativeContents."dc=example" = dbContents;
       };
     };
   };
@@ -84,10 +85,6 @@ in {
       services.openldap = {
         enable = true;
         configDir = "/var/db/slapd.d";
-        # Silence warnings
-        defaultSchemas = null;
-        dataDir = null;
-        database = null;
       };
     };