0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-14 06:00:33 +03:00

nixos/networkmanager: add an enableDefaultPlugins option

many of these plugins are expensive to build (e.g. they embed webkitgtk
for captive portals) or don't even build for some platform
(`pkgsCross...`), so it's nice to give an easy way to disable them.
This commit is contained in:
Colin 2024-06-02 06:05:34 +00:00 committed by misuzu
parent b34038394e
commit 98c23a61c3

View file

@ -239,6 +239,14 @@ in
'';
};
enableDefaultPlugins = mkOption {
type = types.bool;
default = true;
description = ''
Enable a set of recommended plugins.
'';
};
dhcp = mkOption {
type = types.enum [
"dhcpcd"
@ -660,7 +668,7 @@ in
useDHCP = false;
})
{
(mkIf cfg.enableDefaultPlugins {
networkmanager.plugins = with pkgs; [
networkmanager-fortisslvpn
networkmanager-iodine
@ -670,7 +678,7 @@ in
networkmanager-vpnc
networkmanager-sstp
];
}
})
(mkIf cfg.enableStrongSwan {
networkmanager.plugins = [ pkgs.networkmanager_strongswan ];