add env var & cache

Former-commit-id: 1675e96793
This commit is contained in:
Hadi
2025-03-05 16:52:40 +01:00
parent 62b2ff0090
commit ca54d98acf

View File

@@ -18,10 +18,11 @@ in {
"nvidia.NVreg_PreserveVideoMemoryAllocations=1" "nvidia.NVreg_PreserveVideoMemoryAllocations=1"
]; ];
environment.variables = { 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 LIBVA_DRIVER_NAME = "nvidia"; # hardware acceleration
# __GLX_VENDOR_LIBRARY_NAME = "nvidia";
NVD_BACKEND = "direct"; NVD_BACKEND = "direct";
__GLX_VENDOR_LIBRARY_NAME = "nvidia";
__GL_GSYNC_ALLOWED = "1"; # GSync
}; };
nixpkgs.config = { nixpkgs.config = {
nvidia.acceptLicense = true; 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="
];
};
} }