nix-config/config/hardware/nvidia.nix
2024-06-28 20:32:11 +02:00

26 lines
423 B
Nix

{
lib,
minimal,
pkgs,
...
}:
lib.optionalAttrs (!minimal) {
services.xserver.videoDrivers = lib.mkForce ["nvidia"];
hardware = {
graphics = {
enable = true;
enable32Bit = true;
extraPackages = with pkgs; [
vaapiVdpau
nvidia-vaapi-driver
];
};
nvidia = {
powerManagement.enable = true;
modesetting.enable = true;
open = false;
};
};
}