| { config, pkgs, lib, ... }: {
config = {
boot.blacklistedKernelModules = [
"nouveau" "nvidia" "nvidiafb" "rivafb"
];
hardware = {
bumblebee.enable = lib.mkForce false;
nvidia.modesetting.enable = lib.mkForce true;
nvidia.prime = lib.mkForce {
offload.enable = true;
intelBusId = "PCI:0:2:0";
nvidiaBusId = "PCI:1:0:0";
};
opengl = {
enable = true;
extraPackages = [
pkgs.vaapiIntel
config.boot.kernelPackages.nvidia_x11.out
];
extraPackages32 = [
pkgs.pkgsi686Linux.vaapiIntel
config.boot.kernelPackages.nvidia_x11.lib32
];
driSupport = true;
driSupport32Bit = true;
};
};
boot.extraModulePackages = [ config.boot.kernelPackages.nvidia_x11 ];
services.xserver = {
videoDrivers = lib.mkForce [ "nvidia" ];
/*displayManager.setupCommands = ''
xrandr --setprovideroutputsource modesetting NVIDIA-0
xrandr --auto
'';*/
};
};
}
|