mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-27 09:23:01 +00:00
nixos/network-interfaces-scripted: don't bindTo absent network-setup.service
This commit is contained in:
parent
07328220b6
commit
cd13a2074b
@ -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" ];
|
||||
|
Loading…
Reference in New Issue
Block a user