From 9528faf1829bbf77fa693e8700cf8b27eb0b869e Mon Sep 17 00:00:00 2001 From: Kai Wohlfahrt Date: Mon, 24 Aug 2020 00:07:24 +0100 Subject: nixos/openldap: Allow declarativeContents for multiple databases --- nixos/tests/openldap.nix | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'nixos/tests/openldap.nix') diff --git a/nixos/tests/openldap.nix b/nixos/tests/openldap.nix index 33b7b7f6608..0c40073735e 100644 --- a/nixos/tests/openldap.nix +++ b/nixos/tests/openldap.nix @@ -1,5 +1,5 @@ { pkgs, system ? builtins.currentSystem, ... }: let - declarativeContents = '' + dbContents = '' dn: dc=example objectClass: domain dc: example @@ -22,7 +22,6 @@ in { machine = { pkgs, ... }: { services.openldap = { - inherit declarativeContents; enable = true; defaultSchemas = null; dataDir = null; @@ -49,6 +48,7 @@ in { }; }; }; + declarativeContents."dc=example" = dbContents; }; }; }; @@ -60,11 +60,11 @@ in { machine = { pkgs, ... }: { services.openldap = { - inherit declarativeContents; enable = true; suffix = "dc=example"; rootdn = "cn=root,dc=example"; rootpw = "notapassword"; + declarativeContents = dbContents; }; }; }; @@ -85,7 +85,7 @@ in { }; testScript = let - contents = pkgs.writeText "data.ldif" declarativeContents; + contents = pkgs.writeText "data.ldif" dbContents; config = pkgs.writeText "config.ldif" '' dn: cn=config cn: config @@ -129,7 +129,6 @@ in { machine = { pkgs, ... }: { services.openldap = { - inherit declarativeContents; enable = true; suffix = "dc=example"; rootdn = "cn=root,dc=example"; @@ -140,6 +139,7 @@ in { extraDatabaseConfig = '' # No-op ''; + declarativeContents = dbContents; }; }; }; -- cgit 1.4.1