anchor.diff:      inherit useNvidia;
       useDisplayDevice = cfg.connectDisplay;
     };
  +
  +  useBbswitch = cfg.pmMethod == "bbswitch";
   
     primus = pkgs.primus.override {
       inherit useNvidia;
  
positive.code: 
    config = mkIf cfg.enable {
      boot.blacklistedKernelModules = [ "nvidia-drm" "nvidia" "nouveau" ];
      boot.kernelModules = optional cfg.bbswitch [ "bbswitch" ];
      boot.extraModulePackages = optional cfg.bbswitch kernel.bbswitch ++ optional useNvidia kernel.nvidia_x11;
  
      environment.systemPackages = [ bumblebee primus ];
  
  
negative.code:       wantedBy = [ "multi-user.target" ];
        before = [ "display-manager.service" ];
        serviceConfig = {
          ExecStart = "${bumblebee}/bin/bumblebeed --use-syslog -g ${cfg.group} --driver ${cfg.driver} --pm-method ${cfg.pmMethod}";
        };
      };
    };
  