···
{ config, lib, pkgs, ... }:
cfg = config.hardware.bumblebee;
···
27
+
enable = lib.mkOption {
29
+
type = lib.types.bool;
Enable the bumblebee daemon to manage Optimus hybrid video cards.
This should power off secondary GPU until its use is requested
···
37
+
group = lib.mkOption {
40
+
type = lib.types.str;
description = "Group for bumblebee socket";
46
-
connectDisplay = mkOption {
44
+
connectDisplay = lib.mkOption {
46
+
type = lib.types.bool;
Set to true if you intend to connect your discrete card to a
monitor. This option will set up your Nvidia card for EDID
···
56
+
driver = lib.mkOption {
60
-
type = types.enum [ "nvidia" "nouveau" ];
58
+
type = lib.types.enum [ "nvidia" "nouveau" ];
Set driver used by bumblebeed. Supported are nouveau and nvidia.
66
-
pmMethod = mkOption {
64
+
pmMethod = lib.mkOption {
68
-
type = types.enum [ "auto" "bbswitch" "switcheroo" "none" ];
66
+
type = lib.types.enum [ "auto" "bbswitch" "switcheroo" "none" ];
Set preferred power management method for unused card.
···
77
-
config = mkIf cfg.enable {
75
+
config = lib.mkIf cfg.enable {
boot.blacklistedKernelModules = [ "nvidia-drm" "nvidia" "nouveau" ];
79
-
boot.kernelModules = optional useBbswitch "bbswitch";
80
-
boot.extraModulePackages = optional useBbswitch kernel.bbswitch ++ optional useNvidia kernel.nvidia_x11.bin;
77
+
boot.kernelModules = lib.optional useBbswitch "bbswitch";
78
+
boot.extraModulePackages = lib.optional useBbswitch kernel.bbswitch ++ lib.optional useNvidia kernel.nvidia_x11.bin;
environment.systemPackages = [ bumblebee primus ];