mirror of
https://github.com/Gerg-L/nixos.git
synced 2025-12-10 00:43:56 -05:00
using primeCMD option not on search.nixos.org??
This commit is contained in:
parent
f0191e1631
commit
e9cb23e5e3
1 changed files with 6 additions and 11 deletions
|
|
@ -2,20 +2,15 @@ _: {
|
|||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
prime-run = pkgs.writeShellScriptBin "prime-run" ''
|
||||
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 "$@"
|
||||
'';
|
||||
in {
|
||||
environment.systemPackages = [prime-run];
|
||||
}: {
|
||||
hardware.nvidia = {
|
||||
package = config.boot.kernelPackages.nvidiaPackages.latest;
|
||||
prime = {
|
||||
offload.enable = true;
|
||||
offload = {
|
||||
enable = true;
|
||||
enableOffloadCmd = true;
|
||||
};
|
||||
# sync.enable = true;
|
||||
amdgpuBusId = "PCI:5:0:0";
|
||||
nvidiaBusId = "PCI:1:0:0";
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue