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 neovim
mangohud mangohud
lm_sensors lm_sensors
libva-utils
]; ];
# Enable nixd to see nixpkgs path # Enable nixd to see nixpkgs path

View File

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