From 1675e9679364496f70df99714397ee327c48b374 Mon Sep 17 00:00:00 2001 From: Hadi <112569860+anotherhadi@users.noreply.github.com> Date: Wed, 5 Mar 2025 16:52:40 +0100 Subject: [PATCH] add env var & cache --- nixos/nvidia.nix | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/nixos/nvidia.nix b/nixos/nvidia.nix index f3c5e48..31a3347 100644 --- a/nixos/nvidia.nix +++ b/nixos/nvidia.nix @@ -18,10 +18,11 @@ in { "nvidia.NVreg_PreserveVideoMemoryAllocations=1" ]; environment.variables = { - # GBM_BACKEND = "nvidia-drm"; # If crash in firefox, remove this line + GBM_BACKEND = "nvidia-drm"; # If crash in firefox, remove this line LIBVA_DRIVER_NAME = "nvidia"; # hardware acceleration - # __GLX_VENDOR_LIBRARY_NAME = "nvidia"; NVD_BACKEND = "direct"; + __GLX_VENDOR_LIBRARY_NAME = "nvidia"; + __GL_GSYNC_ALLOWED = "1"; # GSync }; nixpkgs.config = { nvidia.acceptLicense = true; @@ -71,5 +72,10 @@ in { ]; }; }; - + nix.settings = { + substituters = [ "https://cuda-maintainers.cachix.org" ]; + trusted-public-keys = [ + "cuda-maintainers.cachix.org-1:0dq3bujKpuEPMCX6U4WylrUDZ9JyUG0VpVZa7CNfq5E=" + ]; + }; }