summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorWilliam A. Kennington III <william@wkennington.com>2014-11-24 11:57:50 -0800
committerWilliam A. Kennington III <william@wkennington.com>2014-11-26 11:22:03 -0800
commit2057d9087fa27413b2802c5ad54e5be5c2088f82 (patch)
tree232ced6eb8bb389cb8dccdc41e79375d78c71442 /nixos
parent0626c1ecf054d61c4fd75dfb85997b814dca6259 (diff)
downloadnixpkgs-2057d9087fa27413b2802c5ad54e5be5c2088f82.tar
nixpkgs-2057d9087fa27413b2802c5ad54e5be5c2088f82.tar.gz
nixpkgs-2057d9087fa27413b2802c5ad54e5be5c2088f82.tar.bz2
nixpkgs-2057d9087fa27413b2802c5ad54e5be5c2088f82.tar.lz
nixpkgs-2057d9087fa27413b2802c5ad54e5be5c2088f82.tar.xz
nixpkgs-2057d9087fa27413b2802c5ad54e5be5c2088f82.tar.zst
nixpkgs-2057d9087fa27413b2802c5ad54e5be5c2088f82.zip
nixos: Support network-online target in addition to ip-up
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/services/networking/dhcpcd.nix1
-rw-r--r--nixos/modules/services/networking/networkmanager.nix1
-rw-r--r--nixos/modules/tasks/network-interfaces-scripted.nix5
3 files changed, 5 insertions, 2 deletions
diff --git a/nixos/modules/services/networking/dhcpcd.nix b/nixos/modules/services/networking/dhcpcd.nix
index d70008e7c23..8b5057cc4ee 100644
--- a/nixos/modules/services/networking/dhcpcd.nix
+++ b/nixos/modules/services/networking/dhcpcd.nix
@@ -58,6 +58,7 @@ let
           ${config.systemd.package}/bin/systemctl try-restart ntpd.service
 
           ${config.systemd.package}/bin/systemctl start ip-up.target
+          ${config.systemd.package}/bin/systemctl start network-online.target
       fi
 
       #if [ "$reason" = EXPIRE -o "$reason" = RELEASE -o "$reason" = NOCARRIER ] ; then
diff --git a/nixos/modules/services/networking/networkmanager.nix b/nixos/modules/services/networking/networkmanager.nix
index bc1c95d3fd3..61dfcae25cb 100644
--- a/nixos/modules/services/networking/networkmanager.nix
+++ b/nixos/modules/services/networking/networkmanager.nix
@@ -52,6 +52,7 @@ let
     #!/bin/sh
     if test "$2" = "up"; then
       ${config.systemd.package}/bin/systemctl start ip-up.target
+      ${config.systemd.package}/bin/systemctl start network-online.target
     fi
   '';
 
diff --git a/nixos/modules/tasks/network-interfaces-scripted.nix b/nixos/modules/tasks/network-interfaces-scripted.nix
index 64291a62421..1ac3310797c 100644
--- a/nixos/modules/tasks/network-interfaces-scripted.nix
+++ b/nixos/modules/tasks/network-interfaces-scripted.nix
@@ -47,8 +47,8 @@ in
           { description = "Networking Setup";
 
             after = [ "network-interfaces.target" ];
-            before = [ "network.target" "network-online.target" ];
-            wantedBy = [ "network.target" "network-online.target" ];
+            before = [ "network.target" ];
+            wantedBy = [ "network.target" ];
 
             unitConfig.ConditionCapability = "CAP_NET_ADMIN";
 
@@ -149,6 +149,7 @@ in
                     ${config.systemd.package}/bin/systemctl try-restart --no-block network-setup.service
                   fi
                   ${config.systemd.package}/bin/systemctl start ip-up.target
+                  ${config.systemd.package}/bin/systemctl start network-online.target
                 '';
             preStop =
               ''