From 4af7db9c731ba5a41fd53b93872e9fe01037c8c7 Mon Sep 17 00:00:00 2001 From: Julien Moutinho Date: Mon, 17 Sep 2018 03:23:32 +0200 Subject: [PATCH] nixos/nslcd: restart when nslcd.conf changes --- nixos/modules/config/ldap.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/nixos/modules/config/ldap.nix b/nixos/modules/config/ldap.nix index 0693e896f71..9a84dd5f5c4 100644 --- a/nixos/modules/config/ldap.nix +++ b/nixos/modules/config/ldap.nix @@ -242,6 +242,13 @@ in ''} ''; + # NOTE: because one cannot pass a custom config path to `nslcd` + # (which is only able to use `/etc/nslcd.conf`) + # changes in `nslcdConfig` won't change `serviceConfig`, + # and thus won't restart `nslcd`. + # Therefore `restartTriggers` is used on `/etc/nslcd.conf`. + restartTriggers = [ nslcdConfig.source ]; + serviceConfig = { ExecStart = "${nss_pam_ldapd}/sbin/nslcd"; Type = "forking";