feat(hosts/orion): enable Nvidia GPU w/ PRIME
This commit is contained in:
parent
b2b5099d76
commit
1ba55b468d
@ -28,13 +28,5 @@
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
hardware.graphics = {
|
|
||||||
enable = true;
|
|
||||||
extraPackages = with pkgs; [
|
|
||||||
intel-media-driver
|
|
||||||
intel-vaapi-driver
|
|
||||||
libvdpau
|
|
||||||
];
|
|
||||||
};
|
|
||||||
services.spice-vdagentd.enable = true;
|
services.spice-vdagentd.enable = true;
|
||||||
}
|
}
|
||||||
|
@ -1,30 +1,37 @@
|
|||||||
{
|
{
|
||||||
inputs,
|
|
||||||
lib,
|
|
||||||
pkgs,
|
pkgs,
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
|
||||||
{
|
{
|
||||||
# NOTE: Disable Nvidia GPU
|
services.xserver.videoDrivers = [ "nvidia" ];
|
||||||
boot.extraModprobeConfig = ''
|
environment.variables.VDPAU_DRIVER = "va_gl";
|
||||||
blacklist nouveau
|
hardware = {
|
||||||
options nouveau iwlwifi power_save=1 modeset=0
|
enableRedistributableFirmware = true;
|
||||||
'';
|
graphics = {
|
||||||
services.udev.extraRules = ''
|
enable = true;
|
||||||
# Remove NVIDIA USB xHCI Host Controller devices, if present
|
extraPackages = with pkgs; [
|
||||||
ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x0c0330", ATTR{power/control}="auto", ATTR{remove}="1"
|
vpl-gpu-rt
|
||||||
# Remove NVIDIA USB Type-C UCSI devices, if present
|
intel-media-driver
|
||||||
ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x0c8000", ATTR{power/control}="auto", ATTR{remove}="1"
|
intel-vaapi-driver
|
||||||
# Remove NVIDIA Audio devices, if present
|
libvdpau-va-gl
|
||||||
ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x040300", ATTR{power/control}="auto", ATTR{remove}="1"
|
nvidia-vaapi-driver
|
||||||
# Remove NVIDIA VGA/3D controller devices
|
|
||||||
ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x03[0-9]*", ATTR{power/control}="auto", ATTR{remove}="1"
|
|
||||||
'';
|
|
||||||
boot.blacklistedKernelModules = [
|
|
||||||
"nouveau"
|
|
||||||
"nvidia"
|
|
||||||
"nvidia_drm"
|
|
||||||
"nvidia_modeset"
|
|
||||||
];
|
];
|
||||||
|
extraPackages32 = with pkgs.driversi686Linux; [ intel-vaapi-driver ];
|
||||||
|
};
|
||||||
|
nvidia = {
|
||||||
|
nvidiaSettings = true;
|
||||||
|
package = config.boot.kernelPackages.nvidiaPackages.beta;
|
||||||
|
powerManagement.enable = true;
|
||||||
|
prime = {
|
||||||
|
offload = {
|
||||||
|
enable = true;
|
||||||
|
enableOffloadCmd = true;
|
||||||
|
};
|
||||||
|
nvidiaBusId = "PCI:1:0:0";
|
||||||
|
intelBusId = "PCI:0:2:0";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user