From a7ef1254e61d9cdccc6096778c8fcc640059aabd Mon Sep 17 00:00:00 2001 From: tu-maurice Date: Sat, 31 Aug 2024 15:22:14 +0200 Subject: [PATCH] tasks/network-interfaces: Disable network-local-commands service if unnecessary If the localCommands variable is empty this service does nothing, but runs anyway. We can disable it in these cases. --- nixos/modules/tasks/network-interfaces.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/nixos/modules/tasks/network-interfaces.nix b/nixos/modules/tasks/network-interfaces.nix index 7e3e24c727b2..570ed4cea134 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" ];