Skip to content

Commit

Permalink
network-interfaces-scripted: fix NixOS/nixops#640
Browse files Browse the repository at this point in the history
Reverse the PartOf dependency between network-setup and network-addresses-*

This was joint work of: @nh2, @domenkozar, @fpletz, @aszlig and @basvandijk
at the NixCon 2017 hackathon.
  • Loading branch information
basvandijk authored and domenkozar committed Oct 30, 2017
1 parent cd97609 commit 07e0c0e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions nixos/modules/tasks/network-interfaces-scripted.nix
Expand Up @@ -93,6 +93,7 @@ let
after = [ "network-pre.target" "systemd-udevd.service" "systemd-sysctl.service" ];
before = [ "network.target" "shutdown.target" ];
wants = [ "network.target" ];
partOf = map (i: "network-addresses-${i.name}.service") interfaces;
conflicts = [ "shutdown.target" ];
wantedBy = [ "multi-user.target" ] ++ optional hasDefaultGatewaySet "network-online.target";

Expand Down Expand Up @@ -171,8 +172,6 @@ let
"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
# there may need ip addresses configured
before = [ "network-setup.service" ];
Expand Down

0 comments on commit 07e0c0e

Please sign in to comment.