diff --git a/nixos/modules/tasks/network-interfaces.nix b/nixos/modules/tasks/network-interfaces.nix index c9ea31a85bee..13a4eaa30990 100644 --- a/nixos/modules/tasks/network-interfaces.nix +++ b/nixos/modules/tasks/network-interfaces.nix @@ -1446,6 +1446,7 @@ in systemd.services = { network-local-commands = { + enable = (cfg.localCommands != ""); description = "Extra networking commands."; before = [ "network.target" ]; wantedBy = [ "network.target" ];