Change:
Describe the bug After I switched to NixOS 19.09, a dhcpcd systemd unit is started after boot. This causes my internet connection to break down after a few seconds: NetworkManager uses dhclient by default, which seems to clash with the already running dhcpcd, and causes NetworkManager to unset the default gateway after a few seconds of working internet connection. As a workaround, I can do . To Reproduce Steps to reproduce the behavior: from NixOS 19.03 to 19.09, . that returns only before, and and after. Expected behavior I want the default gateway to be set correctly and without my interference, because this is necessary for a working internet connection. Additional context More-or-less the result of : Repeatedly calling directly after connecting to WiFi: after setting the default gateway using (the last command was executed in a different WiFi network than the commands, hence the difference in IP adresses): Manually setting the default gateway actually provided me with a working internet connection for a few seconds, until the default gateway was unset again. Using : : Although returns a running process. Update: Probably important hardware info: I'm on a MacBookPro9,2. Its hardware configuration contains: My iMac11,2 does not show the described problem. Its configuration is more or less the same as the one of my MacBook, except for filesystem stuff and hostname/-id. Its hardware configuration contains: After upgrading the iMac to 19.09, it too showed a running process which was not activated before. So it seems like the goal here is not to shut down the new process, but rather to find out why it causes the internet connection to break down on the MacBook and not on the iMac. By the way, before someone told me this problem might not be caused by me overlooking some obvious mistake, I asked this question on . after trying to connect to wifi: <details<summary(this is long)</summary</detailsMetadata system: host os: multi-user?: sandbox: version: channels(root): channels(gwen): nixpkgs: Maintainer information: (Thank you for your quick reply!) /cc
Some parts of NixOS networking are just really confusing to me. TBH, I think something has been up with dhcp config in the module for a bit now. cc
Could you try downgrading to NixOS and see if the problem still appears? I suppose you can do it with My manually configured wired connection does not work since upgrading from NixOS to ().
What does say? Is it set to true, and if so, where?
After executing your command I have a NixOS generation with working wifi. Cool, another clue! :) Interestingly, although still says that dhcpcd is enabled by default, I don't see a running dhcpcd process or a dhcpcd unit in . says dhcpcd is set to true, because that is its default. If I explicitly disable dhcpcd, my internet connection works fine, too. Hmm... I'm confused. I can get wifi to work with , but I still don't understand why this is not a problem on my other machine.
One difference I see is that on 19.03: whereas on 19.09: so now the following condition evaluates to : Edit: Weirdly, is still there, and so I do not see why it is not any more. It is not being set to not anywhere but the default value and tests, so the value from should still prevail.
but i think there is no such difference between and .
Can be relevant? I noticed this change doing
Good eye. has the issue why ^ does not. Probably the issue is the use of instead of . cc Edit: Indeed it evaluates to so the first tow attrsets are lost.
is on master while not on 19.09, thusly the issue started here.

Discussion:
}; # Turn off NixOS' network management when networking is managed entirely by NetworkManager <del> networking = (mkIf (!delegateWireless) { useDHCP = false; # Use mkDefault to trigger the assertion about the conflict above wireless.enable = mkDefault false; }) // (mkIf cfg.enableStrongSwan { networkmanager.packages = [ pkgs.networkmanager_strongswan ]; }) // (mkIf enableIwd { wireless.iwd.enable = true; }); </del> <ins> networking = mkMerge [ (mkIf (!delegateWireless) { useDHCP = false; }) (mkIf cfg.enableStrongSwan { networkmanager.packages = [ pkgs.networkmanager_strongswan ]; }) (mkIf enableIwd { wireless.iwd.enable = true; }) ]; </ins> security.polkit.extraConfig = polkitConf;