summary refs log tree commit diff
path: root/nixos/modules/services/databases/openldap.nix
diff options
context:
space:
mode:
authorKai Wohlfahrt <kai.wohlfahrt@gmail.com>2022-06-04 20:17:11 +0100
committerJörg Thalheim <joerg@thalheim.io>2022-06-29 19:59:29 +0200
commit38ead944cee78c8ee5543067b3ec839bbb36eed6 (patch)
treed2152549628f2d019f9814ee65497b07fd1d12b0 /nixos/modules/services/databases/openldap.nix
parentd72f89a8fc8af8239575ca417e01deeef89f1a1e (diff)
downloadnixpkgs-38ead944cee78c8ee5543067b3ec839bbb36eed6.tar
nixpkgs-38ead944cee78c8ee5543067b3ec839bbb36eed6.tar.gz
nixpkgs-38ead944cee78c8ee5543067b3ec839bbb36eed6.tar.bz2
nixpkgs-38ead944cee78c8ee5543067b3ec839bbb36eed6.tar.lz
nixpkgs-38ead944cee78c8ee5543067b3ec839bbb36eed6.tar.xz
nixpkgs-38ead944cee78c8ee5543067b3ec839bbb36eed6.tar.zst
nixpkgs-38ead944cee78c8ee5543067b3ec839bbb36eed6.zip
openldap: run in foreground
Now that we use notify daemon type, this works safely and simplifies
configuration.
Diffstat (limited to 'nixos/modules/services/databases/openldap.nix')
-rw-r--r--nixos/modules/services/databases/openldap.nix7
1 files changed, 2 insertions, 5 deletions
diff --git a/nixos/modules/services/databases/openldap.nix b/nixos/modules/services/databases/openldap.nix
index 97fd2393128..1d712987a56 100644
--- a/nixos/modules/services/databases/openldap.nix
+++ b/nixos/modules/services/databases/openldap.nix
@@ -169,8 +169,7 @@ in {
         default = null;
         description = ''
           Use this config directory instead of generating one from the
-          <literal>settings</literal> option. Overrides all NixOS settings. If
-          you use this option,ensure `olcPidFile` is set to `/run/slapd/slapd.conf`.
+          <literal>settings</literal> option. Overrides all NixOS settings.
         '';
         example = "/var/db/slapd.d";
       };
@@ -216,7 +215,6 @@ in {
       attrs = {
         objectClass = "olcGlobal";
         cn = "config";
-        olcPidFile = "/run/slapd/slapd.pid";
       };
       children."cn=schema".attrs = {
         cn = "schema";
@@ -265,7 +263,7 @@ in {
       '';
       serviceConfig = {
         ExecStart = lib.escapeShellArgs ([
-          "${openldap}/libexec/slapd" "-u" cfg.user "-g" cfg.group "-F" configDir
+          "${openldap}/libexec/slapd" "-d" "0" "-u" cfg.user "-g" cfg.group "-F" configDir
           "-h" (lib.concatStringsSep " " cfg.urlList)
         ]);
         Type = "notify";
@@ -273,7 +271,6 @@ in {
         # outside the main process:
         #   Got notification message from PID 6378, but reception only permitted for main PID 6377
         NotifyAccess = "all";
-        PIDFile = cfg.settings.attrs.olcPidFile;
       };
     };