aboutsummaryrefslogtreecommitdiff
path: root/scripts/nvidia-offload.nix
blob: de55fa269a0cdd076d368aaaaf352a35ef95b467 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
{ pkgs, ... }:

let
  name = "nvidia-offload";
in
pkgs.writeShellScriptBin name ''
  export __NV_PRIME_RENDER_OFFLOAD=1
  export __NV_PRIME_RENDER_OFFLOAD_PROVIDER=NVIDIA-G0
  export __GLX_VENDOR_LIBRARY_NAME=nvidia
  export __VK_LAYER_NV_optimus=NVIDIA_only
  exec "$@"
''