nixos-configs/devices/binto/modules/nvidia.nix
matt1432 cf60a45c4c
All checks were successful
Discord / discord commits (push) Has been skipped
refactor: small changes and update ff addons
2024-01-16 23:51:28 -05:00

41 lines
1,013 B
Nix

{
config,
pkgs,
...
}: {
# FIXME: move this to hardware-config?
# Enable OpenGL
hardware.opengl = {
enable = true;
driSupport = true;
driSupport32Bit = true;
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;
# FIXME: https://github.com/NVIDIA/open-gpu-kernel-modules/pull/589
open = false;
# Enable the Nvidia settings menu,
# accessible via `nvidia-settings`.
nvidiaSettings = true;
# Vulkan is much more stable in Wayland
package = config.boot.kernelPackages.nvidiaPackages.vulkan_beta;
};
}