bumblebee service: Fix pmMethod bbswitch check

Made useBbswitch work when pmMethod is "auto" and removed invalid pmMethod option "nouveau".
This commit is contained in:
zraexy 2017-02-19 22:46:47 -09:00 committed by GitHub
parent c23c2c50de
commit 5abca15f21

View File

@ -13,7 +13,7 @@ let
useDisplayDevice = cfg.connectDisplay;
};
useBbswitch = cfg.pmMethod == "bbswitch";
useBbswitch = cfg.pmMethod == "bbswitch" || cfg.pmMethod == "auto" && useNvidia;
primus = pkgs.primus.override {
inherit useNvidia;
@ -65,7 +65,7 @@ in
pmMethod = mkOption {
default = "auto";
type = types.enum [ "auto" "bbswitch" "nouveau" "switcheroo" "none" ];
type = types.enum [ "auto" "bbswitch" "switcheroo" "none" ];
description = ''
Set preferred power management method for unused card.
'';