3
0
Fork 0
forked from mirrors/nixpkgs

nixos/networkmanager: fix merging options

Incorrect merging of modules resulted in dhcpcd being enabled causing flaky network connection.

https://github.com/NixOS/nixpkgs/pull/64364

Fixing it uncovered an infinite recursion from the same commit, previously masked by the incorrect merge.

We can just drop the `mkDefault` for `networking.wireless.enable` as it is already `false` by default.

Closes: https://github.com/NixOS/nixpkgs/issues/72416
This commit is contained in:
Jan Tojnar 2019-11-06 18:54:56 +01:00
parent 7827d3f449
commit 894fdfaf1f
No known key found for this signature in database
GPG key ID: 7FAB2A15F7A607A4

View file

@ -456,15 +456,19 @@ in {
};
# Turn off NixOS' network management when networking is managed entirely by NetworkManager
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;
});
networking = mkMerge [
(mkIf (!delegateWireless) {
useDHCP = false;
})
(mkIf cfg.enableStrongSwan {
networkmanager.packages = [ pkgs.networkmanager_strongswan ];
})
(mkIf enableIwd {
wireless.iwd.enable = true;
})
];
security.polkit.extraConfig = polkitConf;