summaryrefslogtreecommitdiffstats
path: root/modules/hardware
diff options
context:
space:
mode:
Diffstat (limited to 'modules/hardware')
-rw-r--r--modules/hardware/gpu.nix35
1 files changed, 20 insertions, 15 deletions
diff --git a/modules/hardware/gpu.nix b/modules/hardware/gpu.nix
index fd696ab..bb8b831 100644
--- a/modules/hardware/gpu.nix
+++ b/modules/hardware/gpu.nix
@@ -17,10 +17,8 @@ in {
config = lib.mkIf (gpuConfig.enable) (lib.mkMerge [
{
- hardware.opengl = {
+ hardware.graphics = {
enable = true;
- driSupport = true;
- driSupport32Bit = true;
};
}
(lib.mkIf (device.gpu == "intel") {
@@ -38,24 +36,31 @@ in {
environment.variables.VDPAU_DRIVER = "va_gl";
})
(lib.mkIf (device.gpu == "nvidia") {
+ boot = {
+ extraModulePackages = [
+ config.boot.kernelPackages.nvidia_x11_beta
+ ];
+ initrd.kernelModules = [
+ "nvidia"
+ "nvidia_modeset"
+ "nvidia_uvm"
+ "nvidia_drm"
+ ];
+ blacklistedKernelModules = [ "nouveau" ];
+ };
+
+ environment.systemPackages = with pkgs; [
+ pkgs.nvidia-vaapi-driver
+ ];
+
services.xserver.videoDrivers = ["nvidia"];
hardware.nvidia = {
modesetting.enable = true;
- powerManagement.enable = false;
- powerManagement.finegrained = false;
+ powerManagement.enable = true;
open = false;
nvidiaSettings = true;
- package = config.boot.kernelPackages.nvidiaPackages.production;
+ package = config.boot.kernelPackages.nvidiaPackages.beta;
};
- boot.initrd.kernelModules = [
- "nvidia"
- "nvidia_modeset"
- "nvidia_uvm"
- "nvidia_drm"
- ];
- boot.extraModprobeConfig = ''
- options nvidia-drm modeset=1
- '';
})
]);
}