diff options
author | Artturi <Artturin@artturin.com> | 2022-07-19 01:33:14 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-19 01:33:14 +0300 |
commit | 6dc4ee65f7268c46715e3f5a25665fdea19a698b (patch) | |
tree | 57b36f87ee70ee2527de12c21cbe86cf12d99ab8 /nixos/modules/tasks | |
parent | 2df37941652c28e0858b9a9520ce5763c43c2ec1 (diff) | |
parent | cd13a2074b6c8c909b1f73cc641e2481d921db02 (diff) |
Merge pull request #179163 from cmm/network-setup-bindTo
nixos/network-interfaces-scripted: don't bindTo absent network-setup.service
Diffstat (limited to 'nixos/modules/tasks')
-rw-r--r-- | nixos/modules/tasks/network-interfaces-scripted.nix | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/nixos/modules/tasks/network-interfaces-scripted.nix b/nixos/modules/tasks/network-interfaces-scripted.nix index dce72b36fc501..f44dafc9706a0 100644 --- a/nixos/modules/tasks/network-interfaces-scripted.nix +++ b/nixos/modules/tasks/network-interfaces-scripted.nix @@ -85,12 +85,14 @@ let hasDefaultGatewaySet = (cfg.defaultGateway != null && cfg.defaultGateway.address != "") || (cfg.enableIPv6 && cfg.defaultGateway6 != null && cfg.defaultGateway6.address != ""); - networkLocalCommands = { + needNetworkSetup = cfg.resolvconf.enable || cfg.defaultGateway != null || cfg.defaultGateway6 != null; + + networkLocalCommands = lib.mkIf needNetworkSetup { after = [ "network-setup.service" ]; bindsTo = [ "network-setup.service" ]; }; - networkSetup = lib.mkIf (config.networking.resolvconf.enable || cfg.defaultGateway != null || cfg.defaultGateway6 != null) + networkSetup = lib.mkIf needNetworkSetup { description = "Networking Setup"; after = [ "network-pre.target" "systemd-udevd.service" "systemd-sysctl.service" ]; |