nixos/nscd: Add requiredBy for the nss targets

This is to ensure the targets are stopped when nscd is stopped to
prevent races on switch. Example interaction: nscd is stopped, some
service that requires nss-user-lookup.target is restarted. Without this
PR, nss-user-lookup.target would still be active, hence the service
would start without nscd running.
This commit is contained in:
Janne Heß 2022-08-15 13:18:03 +02:00
parent f4e2a3c698
commit 8cef7eec93
No known key found for this signature in database
GPG key ID: 69165158F05265DF

View file

@ -62,6 +62,7 @@ in
before = [ "nss-lookup.target" "nss-user-lookup.target" ];
wants = [ "nss-lookup.target" "nss-user-lookup.target" ];
wantedBy = [ "multi-user.target" ];
requiredBy = [ "nss-lookup.target" "nss-user-lookup.target" ];
environment = { LD_LIBRARY_PATH = nssModulesPath; };