nixos/networkmanager: fix merging options (#72916)

nixos/networkmanager: fix merging options
This commit is contained in:
Silvan Mosberger 2019-11-06 23:34:40 +01:00 committed by GitHub
commit d34194badd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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;