40 lines
907 B
Nix
40 lines
907 B
Nix
|
{ config, lib, pkgs, ... }:
|
||
|
{
|
||
|
# Make sure opengl is enabled
|
||
|
hardware.opengl = {
|
||
|
enable = true;
|
||
|
driSupport = true;
|
||
|
driSupport32Bit = true;
|
||
|
};
|
||
|
|
||
|
environment.systemPackages = with pkgs; [
|
||
|
glxinfo
|
||
|
];
|
||
|
|
||
|
# Tell Xorg to use the nvidia driver (also valid for Wayland)
|
||
|
services.xserver.videoDrivers = ["nvidia"];
|
||
|
|
||
|
hardware.nvidia = {
|
||
|
|
||
|
# Modesetting is needed for most Wayland compositors
|
||
|
modesetting.enable = true;
|
||
|
|
||
|
# Use the open source version of the kernel module
|
||
|
# Only available on driver 515.43.04+
|
||
|
open = false;
|
||
|
|
||
|
# Enable the nvidia settings menu
|
||
|
nvidiaSettings = true;
|
||
|
|
||
|
# Optionally, you may need to select the appropriate driver version for your specific GPU.
|
||
|
package = config.boot.kernelPackages.nvidiaPackages.stable;
|
||
|
|
||
|
prime = {
|
||
|
sync.enable = true;
|
||
|
|
||
|
intelBusId = "PCI:0:2:0";
|
||
|
nvidiaBusId = "PCI:1:0:0";
|
||
|
};
|
||
|
};
|
||
|
}
|