Ayo the pizza here (restructuring)

This commit is contained in:
2021-07-21 22:32:32 +05:30
parent 7dffa41ae2
commit 347c8bd00c
41 changed files with 86 additions and 126 deletions

View File

@@ -0,0 +1,31 @@
{config, pkgs, ... }:
let
nvidia-offload = 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" "$@"
'';
in
{
environment.systemPackages = with pkgs; [
nvidia-offload
];
hardware = {
opengl = {
driSupport32Bit = true;
#package = pkgs.mesa_drivers;
enable = true;
};
nvidia = {
prime = {
offload = { enable = true; };
intelBusId = "PCI:0:2:0";
nvidiaBusId = "PCI:1:0:0";
};
modesetting = { enable = true; };
};
};
services.xserver.videoDrivers = [ "nvidia" ];
}