Skip to content

Commit

Permalink
nixos/networkmanager: add an enableDefaultPlugins option
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
uninsane committed Jul 7, 2024
1 parent 04be582 commit de129ff
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions nixos/modules/services/networking/networkmanager.nix
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,14 @@ in
'';
};

enableDefaultPlugins = mkOption {
type = types.bool;
default = true;
description = ''
Enable a set of recommended plugins.
'';
};

dhcp = mkOption {
type = types.enum [ "dhcpcd" "internal" ];
default = "internal";
Expand Down Expand Up @@ -594,7 +602,7 @@ in
useDHCP = false;
})

{
(mkIf cfg.enableDefaultPlugins {
networkmanager.plugins = with pkgs; [
networkmanager-fortisslvpn
networkmanager-iodine
Expand All @@ -604,7 +612,7 @@ in
networkmanager-vpnc
networkmanager-sstp
];
}
})

(mkIf cfg.enableStrongSwan {
networkmanager.plugins = [ pkgs.networkmanager_strongswan ];
Expand Down

0 comments on commit de129ff

Please sign in to comment.