diff options
author | Franz Pletz <fpletz@fnordicwalking.de> | 2017-09-24 15:55:02 +0200 |
---|---|---|
committer | Franz Pletz <fpletz@fnordicwalking.de> | 2017-09-25 14:06:38 +0200 |
commit | 3a670daa9882de4c7a95f81a36e988c5771c1724 (patch) | |
tree | eea866e27e1ae01921fa8d4d14bfc2b25e33f45f | |
parent | 4429559aa15e59731462a91784d7c66b345d219e (diff) | |
download | nixlib-3a670daa9882de4c7a95f81a36e988c5771c1724.tar nixlib-3a670daa9882de4c7a95f81a36e988c5771c1724.tar.gz nixlib-3a670daa9882de4c7a95f81a36e988c5771c1724.tar.bz2 nixlib-3a670daa9882de4c7a95f81a36e988c5771c1724.tar.lz nixlib-3a670daa9882de4c7a95f81a36e988c5771c1724.tar.xz nixlib-3a670daa9882de4c7a95f81a36e988c5771c1724.tar.zst nixlib-3a670daa9882de4c7a95f81a36e988c5771c1724.zip |
nixos/network-interfaces: IPs must always be set
Previously, depending on the environment and the type of interface that was created, the configured IPs of an interface wouldn't be applied on a nixos-rebuild switch. It works after a reboot. This patch ensures that the network-addresses service is started either via the network-link service or if the networking target is activated (i.e. on system activation). Fixes #28474 #16230.
-rw-r--r-- | nixos/modules/tasks/network-interfaces-scripted.nix | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/nixos/modules/tasks/network-interfaces-scripted.nix b/nixos/modules/tasks/network-interfaces-scripted.nix index 7ede8752bcc3..26fba1d5adbb 100644 --- a/nixos/modules/tasks/network-interfaces-scripted.nix +++ b/nixos/modules/tasks/network-interfaces-scripted.nix @@ -152,7 +152,11 @@ let in nameValuePair "network-addresses-${i.name}" { description = "Address configuration of ${i.name}"; - wantedBy = [ "network-setup.service" ]; + wantedBy = [ + "network-setup.service" + "network-link-${i.name}.service" + "network.target" + ]; # propagate stop and reload from network-setup partOf = [ "network-setup.service" ]; # order before network-setup because the routes that are configured |