nixos/networking: warn when both networkd and dhcpcd can collide
This commit is contained in:
parent
aea649223b
commit
b4e162a109
1 changed files with 4 additions and 1 deletions
|
@ -1326,7 +1326,10 @@ in
|
|||
|
||||
config = {
|
||||
|
||||
warnings = concatMap (i: i.warnings) interfaces;
|
||||
warnings = (concatMap (i: i.warnings) interfaces) ++ (lib.optional
|
||||
(config.systemd.network.enable && cfg.useDHCP && !cfg.useNetworkd) ''
|
||||
The combination of `systemd.network.enable = true`, `networking.useDHCP = true` and `networking.useNetworkd = false` can cause both networkd and dhcpcd to manage the same interfaces. This can lead to loss of networking. It is recommended you choose only one of networkd (by also enabling `networking.useNetworkd`) or scripting (by disabling `systemd.network.enable`)
|
||||
'');
|
||||
|
||||
assertions =
|
||||
(forEach interfaces (i: {
|
||||
|
|
Loading…
Reference in a new issue