From 4cd430ae54d9d53c3041727e32cf8a78b946ea96 Mon Sep 17 00:00:00 2001 From: Jack Henry Date: Thu, 9 Jul 2026 08:43:55 -0700 Subject: [PATCH] nixos/networkd-dispatcher: add warning when useNetworkd is not enabled networkd-dispatcher is driven by systemd-networkd events, so enabling the module without `networking.useNetworkd = true` leaves configured scripts unrun with no indication of why. Warn at evaluation time to make the misconfiguration obvious. (See #538523) --- nixos/modules/services/networking/networkd-dispatcher.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/nixos/modules/services/networking/networkd-dispatcher.nix b/nixos/modules/services/networking/networkd-dispatcher.nix index eb874447bb3a..adc948104da3 100644 --- a/nixos/modules/services/networking/networkd-dispatcher.nix +++ b/nixos/modules/services/networking/networkd-dispatcher.nix @@ -93,6 +93,10 @@ in config = mkIf cfg.enable { + warnings = mkIf (!config.networking.useNetworkd) [ + "services.networkd-dispatcher will not execute any scripts unless networking.useNetworkd is enabled." + ]; + systemd = { packages = [ pkgs.networkd-dispatcher ]; services.networkd-dispatcher = {