nix-config/modules/hardware/nvidia.nix
2023-09-26 22:25:58 +02:00

26 lines
431 B
Nix

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