summary refs log tree commit diff
diff options
context:
space:
mode:
authorJulien Moutinho <julm+nix@autogeree.net>2018-12-30 11:36:46 +0100
committerJulien Moutinho <julm+nix@autogeree.net>2019-01-09 17:45:19 +0100
commiteb90d9700958aefbc7b886f2b524c6d04dc1d80d (patch)
treee4807403453f8df38fa38fb2172eb094532a2df7
parent4af7db9c731ba5a41fd53b93872e9fe01037c8c7 (diff)
downloadnixpkgs-eb90d9700958aefbc7b886f2b524c6d04dc1d80d.tar
nixpkgs-eb90d9700958aefbc7b886f2b524c6d04dc1d80d.tar.gz
nixpkgs-eb90d9700958aefbc7b886f2b524c6d04dc1d80d.tar.bz2
nixpkgs-eb90d9700958aefbc7b886f2b524c6d04dc1d80d.tar.lz
nixpkgs-eb90d9700958aefbc7b886f2b524c6d04dc1d80d.tar.xz
nixpkgs-eb90d9700958aefbc7b886f2b524c6d04dc1d80d.tar.zst
nixpkgs-eb90d9700958aefbc7b886f2b524c6d04dc1d80d.zip
nixos/nslcd: use systemd's RuntimeDirectory
-rw-r--r--nixos/modules/config/ldap.nix4
1 files changed, 1 insertions, 3 deletions
diff --git a/nixos/modules/config/ldap.nix b/nixos/modules/config/ldap.nix
index 9a84dd5f5c4..18823221990 100644
--- a/nixos/modules/config/ldap.nix
+++ b/nixos/modules/config/ldap.nix
@@ -232,9 +232,6 @@ in
         wantedBy = [ "multi-user.target" ];
 
         preStart = ''
-          mkdir -p /run/nslcd
-          rm -f /run/nslcd/nslcd.pid;
-          chown nslcd.nslcd /run/nslcd
           ${optionalString (cfg.bind.distinguishedName != "") ''
             if test -s "${cfg.bind.password}" ; then
               ln -sfT "${cfg.bind.password}" /run/nslcd/bindpw
@@ -254,6 +251,7 @@ in
           Type = "forking";
           PIDFile = "/run/nslcd/nslcd.pid";
           Restart = "always";
+          RuntimeDirectory = [ "nslcd" ];
         };
       };