config/systems/mdesktop/nvidia.nix

24 lines
731 B
Nix
Raw Normal View History

{ config, pkgs, ... }:
2023-03-09 08:33:38 +00:00
{
hardware.opengl.enable = true;
hardware.opengl.driSupport = true;
2023-03-09 08:33:38 +00:00
hardware.opengl.driSupport32Bit = true;
hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.stable;
hardware.nvidia.open = false;
2023-10-07 10:30:12 +01:00
hardware.nvidia.modesetting.enable = false;
2023-03-09 08:33:38 +00:00
services.xserver.videoDrivers = [ "nvidia" ];
# Fix tauri applications with nvidia drivers
environment.sessionVariables = {
"WEBKIT_DISABLE_COMPOSITING_MODE" = "1";
};
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
}