2023-08-24 09:36:13 +01:00
|
|
|
{ config, pkgs, ... }:
|
2023-03-09 08:33:38 +00:00
|
|
|
|
|
|
|
{
|
|
|
|
hardware.opengl.enable = true;
|
2023-08-24 09:36:13 +01:00
|
|
|
hardware.opengl.driSupport = true;
|
2023-03-09 08:33:38 +00:00
|
|
|
hardware.opengl.driSupport32Bit = true;
|
|
|
|
hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.stable;
|
2023-08-24 09:36:13 +01:00
|
|
|
hardware.nvidia.open = false;
|
|
|
|
hardware.nvidia.modesetting.enable = true;
|
2023-03-09 08:33:38 +00:00
|
|
|
services.xserver.videoDrivers = [ "nvidia" ];
|
2023-08-24 09:36:13 +01:00
|
|
|
|
|
|
|
hardware.opengl.extraPackages = [
|
|
|
|
(pkgs.runCommand "nvidia-icd" { } ''
|
|
|
|
mkdir -p $out/share/vulkan/icd.d
|
|
|
|
cp ${pkgs.linuxPackages.nvidia_x11}/share/vulkan/icd.d/nvidia_icd.x86_64.json $out/share/vulkan/icd.d/nvidia_icd.json
|
|
|
|
'')
|
|
|
|
];
|
2023-03-09 08:33:38 +00:00
|
|
|
}
|