all repos — dotfiles @ 64f75fd5881d155ffde0d04d2c1e8b440c878aa1

my *nix dotfiles

bin/nvidia-offload.nix (view raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
 10
{ pkgs, ... }:

pkgs.writeShellScriptBin "nvidia-offload"
  ''
    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 -a "$0" "$@"
  ''