summary refs log tree commit diff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/config/networking.nix2
-rw-r--r--modules/services/networking/dhcpcd.nix3
-rw-r--r--modules/services/system/nscd.nix17
-rw-r--r--modules/system/boot/shutdown.nix2
-rw-r--r--modules/system/boot/stage-2-init.sh2
5 files changed, 10 insertions, 16 deletions
diff --git a/modules/config/networking.nix b/modules/config/networking.nix
index a91ce9c59e2..5896e9ec9fd 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 c1cc22f905c..77d4ac6253c 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 80fa1394aca..d92e4e608b5 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 1335429b669..3fb9545b33f 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 e8b01788900..80aff11b34b 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