nixos-configs/devices/binto/modules/nvidia.nix

41 lines
940 B
Nix
Raw Normal View History

{
config,
pkgs,
...
}: {
# FIXME: move this to hardware-config?
# Enable OpenGL
hardware.opengl = {
enable = true;
driSupport = true;
driSupport32Bit = true;
2023-11-25 03:24:12 -05:00
extraPackages = with pkgs; [
vaapiVdpau
];
};
# Load nvidia driver for Xorg and Wayland
services.xserver.videoDrivers = ["nvidia"];
hardware.nvidia = {
modesetting.enable = true;
# Nvidia power management. Experimental, and can cause sleep/suspend to fail.
powerManagement.enable = false;
# Fine-grained power management. Turns off GPU when not in use.
# Experimental and only works on modern Nvidia GPUs (Turing or newer).
powerManagement.finegrained = false;
2024-02-05 08:47:26 -05:00
open = true;
# Enable the Nvidia settings menu,
2023-11-22 15:33:16 -05:00
# accessible via `nvidia-settings`.
nvidiaSettings = true;
# Vulkan is much more stable in Wayland
package = config.boot.kernelPackages.nvidiaPackages.vulkan_beta;
};
}