4 kernel = config.boot.kernelPackages;
13 hardware.nvidiaOptimus.disable = lib.mkOption {
15 type = lib.types.bool;
17 Completely disable the NVIDIA graphics card and use the
18 integrated graphics processor instead.
26 config = lib.mkIf config.hardware.nvidiaOptimus.disable {
27 boot.blacklistedKernelModules = [
34 boot.kernelModules = [ "bbswitch" ];
35 boot.extraModulePackages = [ kernel.bbswitch ];
37 systemd.services.bbswitch = {
38 description = "Disable NVIDIA Card";
39 wantedBy = [ "multi-user.target" ];
42 RemainAfterExit = true;
43 ExecStart = "${kernel.bbswitch}/bin/discrete_vga_poweroff";
44 ExecStop = "${kernel.bbswitch}/bin/discrete_vga_poweron";
46 path = [ kernel.bbswitch ];