diff --git a/modules/services/system/nscd.nix b/modules/services/system/nscd.nix index eecb845d5471..1843368ba27d 100644 --- a/modules/services/system/nscd.nix +++ b/modules/services/system/nscd.nix @@ -41,7 +41,7 @@ in boot.systemd.services.nscd = { description = "Name Service Cache Daemon"; - wantedBy = [ "multi-user.target" ]; + wantedBy = [ "nss-lookup.target" "nss-user-lookup.target" ]; environment = { LD_LIBRARY_PATH = nssModulesPath; }; diff --git a/modules/system/boot/systemd.nix b/modules/system/boot/systemd.nix index ecd6b07c0fff..a65c95e60f99 100644 --- a/modules/system/boot/systemd.nix +++ b/modules/system/boot/systemd.nix @@ -321,7 +321,8 @@ let ln -s ${cfg.defaultUnit} $out/default.target #ln -s ../getty@tty1.service $out/multi-user.target.wants/ - ln -s ../local-fs.target ../remote-fs.target ../network.target ../swap.target $out/multi-user.target.wants/ + ln -s ../local-fs.target ../remote-fs.target ../network.target ../nss-lookup.target \ + ../nss-user-lookup.target ../swap.target $out/multi-user.target.wants/ ''; # */ in