Setup nvidia vaapi.

This commit is contained in:
CronyAkatsuki 2025-02-09 15:10:55 +01:00
parent d63beac355
commit ba5d5da07b
2 changed files with 22 additions and 12 deletions

View File

@ -106,6 +106,7 @@
neovim
mangohud
lm_sensors
libva-utils
];
# Enable nixd to see nixpkgs path

View File

@ -1,5 +1,6 @@
{
lib,
pkgs,
config,
...
}: {
@ -9,19 +10,27 @@
};
config = lib.mkIf config.crony.nvidia.enable {
services.xserver.videoDrivers = ["nvidia"];
hardware.nvidia.open = false;
hardware.nvidia.modesetting.enable = true;
hardware.nvidia.powerManagement.enable = true;
hardware.nvidia.nvidiaSettings = true;
hardware.nvidia.prime = {
offload = {
enableOffloadCmd = true;
enable = true;
};
# Setup vaapi for nvidia
hardware.graphics.extraPackages = with pkgs; [
nvidia-vaapi-driver
];
nvidiaBusId = "PCI:1:0:0";
amdgpuBusId = "PCI:5:0:0";
# Setup nvidia drivers
services.xserver.videoDrivers = ["nvidia"];
hardware.nvidia = {
open = false;
modesetting.enable = true;
powerManagement.enable = true;
nvidiaSettings = true;
prime = {
offload = {
enableOffloadCmd = true;
enable = true;
};
nvidiaBusId = "PCI:1:0:0";
amdgpuBusId = "PCI:5:0:0";
};
};
};
}