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)
This commit is contained in:
Jack Henry
2026-07-09 11:07:41 -07:00
parent 4ed1c30999
commit 4cd430ae54
@@ -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 = {