summary refs log tree commit diff
path: root/nixos/modules/system/boot/networkd.nix
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2015-04-19 21:11:14 +0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2015-04-19 22:06:45 +0200
commitc87977e97d97b8036caafb3a7e855c246712d739 (patch)
treee9954b3f6f34422bc2e787b4d792379066beb058 /nixos/modules/system/boot/networkd.nix
parentf8dbe5f376978947067283c6d03087d7948c50de (diff)
downloadnixlib-c87977e97d97b8036caafb3a7e855c246712d739.tar
nixlib-c87977e97d97b8036caafb3a7e855c246712d739.tar.gz
nixlib-c87977e97d97b8036caafb3a7e855c246712d739.tar.bz2
nixlib-c87977e97d97b8036caafb3a7e855c246712d739.tar.lz
nixlib-c87977e97d97b8036caafb3a7e855c246712d739.tar.xz
nixlib-c87977e97d97b8036caafb3a7e855c246712d739.tar.zst
nixlib-c87977e97d97b8036caafb3a7e855c246712d739.zip
Don't include networkd units unless enabled
Otherwise, the enabled -> disabled transition won't be handled
correctly (switch-to-configuration currently assumes that if a unit is
running and exists, it should be restarted).
Diffstat (limited to 'nixos/modules/system/boot/networkd.nix')
-rw-r--r--nixos/modules/system/boot/networkd.nix3
1 files changed, 3 insertions, 0 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