diff --git a/modules/config/networking.nix b/modules/config/networking.nix index a91ce9c59e26..5896e9ec9fd4 100644 --- a/modules/config/networking.nix +++ b/modules/config/networking.nix @@ -67,7 +67,7 @@ in '' + optionalString config.services.nscd.enable '' # Invalidate the nscd cache whenever resolv.conf is # regenerated. - libc_restart='${pkgs.systemd}/bin/systemctl start invalidate-nscd.service' + libc_restart='${pkgs.systemd}/bin/systemctl reload --no-block nscd.service' '' + optionalString config.services.bind.enable '' # This hosts runs a full-blown DNS resolver. name_servers='127.0.0.1' diff --git a/modules/services/networking/dhcpcd.nix b/modules/services/networking/dhcpcd.nix index c1cc22f905c5..77d4ac6253c7 100644 --- a/modules/services/networking/dhcpcd.nix +++ b/modules/services/networking/dhcpcd.nix @@ -92,7 +92,8 @@ in config = mkIf config.networking.useDHCP { jobs.dhcpcd = - { startOn = "started network-interfaces"; + { wantedBy = [ "multi-user.target" ]; + after = [ "network-interfaces.service" ]; path = [ dhcpcd pkgs.nettools pkgs.openresolv ]; diff --git a/modules/services/system/nscd.nix b/modules/services/system/nscd.nix index 80fa1394aca6..d92e4e608b59 100644 --- a/modules/services/system/nscd.nix +++ b/modules/services/system/nscd.nix @@ -58,18 +58,11 @@ in daemonType = "fork"; - serviceConfig = "PIDFile=/run/nscd/nscd.pid"; - }; - - # Flush nscd's ‘hosts’ database when the network comes up or the - # system configuration changes to get rid of any negative entries. - jobs.invalidate_nscd = - { name = "invalidate-nscd"; - description = "Invalidate NSCD cache"; - startOn = "ip-up or config-changed"; - after = [ "nscd.service" ]; - task = true; - exec = "${pkgs.glibc}/sbin/nscd --invalidate hosts"; + serviceConfig = + '' + PIDFile=/run/nscd/nscd.pid + ExecReload=${pkgs.glibc}/sbin/nscd --invalidate hosts + ''; }; }; diff --git a/modules/system/boot/shutdown.nix b/modules/system/boot/shutdown.nix index 1335429b6697..3fb9545b33fb 100644 --- a/modules/system/boot/shutdown.nix +++ b/modules/system/boot/shutdown.nix @@ -21,5 +21,5 @@ with pkgs.lib; ExecStart=${pkgs.utillinux}/sbin/hwclock --systohc ${if config.time.hardwareClockInLocalTime then "--localtime" else "--utc"} ''; }; - + } diff --git a/modules/system/boot/stage-2-init.sh b/modules/system/boot/stage-2-init.sh index e8b01788900b..80aff11b34b0 100644 --- a/modules/system/boot/stage-2-init.sh +++ b/modules/system/boot/stage-2-init.sh @@ -179,4 +179,4 @@ fi echo "starting systemd..." PATH=/run/current-system/systemd/lib/systemd \ MODULE_DIR=/run/current-system/kernel-modules/lib/modules \ - exec systemd --log-target journal # --log-level debug --crash-shell + exec systemd --log-target=journal # --log-level=debug --log-target=console --crash-shell