diff --git a/nixos/modules/tasks/network-interfaces.nix b/nixos/modules/tasks/network-interfaces.nix index cef9c38c2e3047..19bb0655af21c8 100644 --- a/nixos/modules/tasks/network-interfaces.nix +++ b/nixos/modules/tasks/network-interfaces.nix @@ -976,6 +976,17 @@ in Temporary addresses are only needed when IPv6 is enabled. ''; })) ++ [ + { + assertion = cfg.useDHCP -> cfg.bridges == {}; + message = '' + There are the bridges [ ${builtins.toString (builtins.attrNames cfg.bridges)} ] configured while `networking.useDHCP` is enabled. + dhcpcd doesn't give IPv4 addresses to bridges by default anymore, + so you have to set `networking.useDHCP = false` and then whitelist + every interface you need DHCP on with + `networking.interfaces..useDHCP = true`. + ''; + } + ] ++ [ { assertion = cfg.hostId == null || (stringLength cfg.hostId == 8 && isHexString cfg.hostId); message = "Invalid value given to the networking.hostId option.";