summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--nixos/modules/system/boot/networkd.nix3
-rw-r--r--nixos/modules/system/boot/resolved.nix2
-rw-r--r--nixos/modules/system/boot/systemd.nix6
-rw-r--r--nixos/modules/system/boot/timesyncd.nix2
4 files changed, 7 insertions, 6 deletions
diff --git a/nixos/modules/system/boot/networkd.nix b/nixos/modules/system/boot/networkd.nix
index 34a8b3fe0f95..21ee33a691a0 100644
--- a/nixos/modules/system/boot/networkd.nix
+++ b/nixos/modules/system/boot/networkd.nix
@@ -624,6 +624,9 @@ in
 
   config = mkIf config.systemd.network.enable {
 
+    systemd.additionalUpstreamSystemUnits =
+      [ "systemd-networkd.service" "systemd-networkd-wait-online.service" ];
+
     systemd.network.units =
       mapAttrs' (n: v: nameValuePair "${n}.link" (linkToUnit n v)) cfg.links
       // mapAttrs' (n: v: nameValuePair "${n}.netdev" (netdevToUnit n v)) cfg.netdevs
diff --git a/nixos/modules/system/boot/resolved.nix b/nixos/modules/system/boot/resolved.nix
index cdc76d59f9a8..ecd547322d3c 100644
--- a/nixos/modules/system/boot/resolved.nix
+++ b/nixos/modules/system/boot/resolved.nix
@@ -18,6 +18,8 @@ with lib;
 
   config = mkIf config.services.resolved.enable {
 
+    systemd.additionalUpstreamSystemUnits = [ "systemd-resolved.service" ];
+
     systemd.services.systemd-resolved = {
       wantedBy = [ "multi-user.target" ];
       restartTriggers = [ config.environment.etc."systemd/resolved.conf".source ];
diff --git a/nixos/modules/system/boot/systemd.nix b/nixos/modules/system/boot/systemd.nix
index 4bd412014a54..12de5c9b16fb 100644
--- a/nixos/modules/system/boot/systemd.nix
+++ b/nixos/modules/system/boot/systemd.nix
@@ -97,12 +97,6 @@ let
       "systemd-modules-load.service"
       "kmod-static-nodes.service"
 
-      # Networking
-      "systemd-networkd.service"
-      "systemd-networkd-wait-online.service"
-      "systemd-resolved.service"
-      "systemd-timesyncd.service"
-
       # Filesystems.
       "systemd-fsck@.service"
       "systemd-fsck-root.service"
diff --git a/nixos/modules/system/boot/timesyncd.nix b/nixos/modules/system/boot/timesyncd.nix
index fd4be47ad721..cba965b1cd2b 100644
--- a/nixos/modules/system/boot/timesyncd.nix
+++ b/nixos/modules/system/boot/timesyncd.nix
@@ -18,6 +18,8 @@ with lib;
 
   config = mkIf config.services.timesyncd.enable {
 
+    systemd.additionalUpstreamSystemUnits = [ "systemd-timesyncd.service" ];
+
     systemd.services.systemd-timesyncd = {
       wantedBy = [ "sysinit.target" ];
       restartTriggers = [ config.environment.etc."systemd/timesyncd.conf".source ];