nix-config/config/support/nvidia.nix

26 lines
425 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;
};
};
}