niksos/options/common/gpu/amd.nix

39 lines
862 B
Nix
Raw Normal View History

2024-02-15 17:04:34 +01:00
{
lib,
2024-02-15 17:04:34 +01:00
pkgs,
...
}: let
inherit (lib.attrsets) attrValues;
in {
2024-02-15 17:04:34 +01:00
hardware = {
graphics = {
2024-02-15 17:04:34 +01:00
enable = true;
enable32Bit = true;
extraPackages = attrValues {
inherit (pkgs)
mesa
amdvlk
libdrm
libva
vaapiVdpau
libvdpau-va-gl
;
inherit (pkgs.rocmPackages.clr) icd;
};
extraPackages32 = attrValues {
inherit (pkgs.driversi686Linux)
mesa
amdvlk
libvdpau-va-gl
;
};
2024-02-15 17:04:34 +01:00
};
};
2024-02-17 19:56:59 +01:00
boot.initrd.kernelModules = [ "amdgpu" ];
2024-02-17 19:56:59 +01:00
environment.sessionVariables = {
AMD_VULKAN_ICD = "RADV";
};
2024-02-15 17:04:34 +01:00
}