nixos-config/common/hardware/amd-gpu.nix

25 lines
587 B
Nix

{pkgs, ...}: {
boot = {
initrd.kernelModules = ["amdgpu"];
# params for Sea Islands or smth
kernelParams = ["radeon.cik_support=0" "amdgpu.cik_support=1"];
};
hardware.graphics.enable = true;
hardware.opengl = {
## radv: an open-source Vulkan driver from freedesktop
# driSupport = true;
# driSupport32Bit = true;
## amdvlk: an open-source Vulkan driver from AMD
extraPackages = [pkgs.amdvlk];
extraPackages32 = [pkgs.driversi686Linux.amdvlk];
};
hardware.graphics.enable32Bit = true;
services.xserver.videoDrivers = ["amdgpu"];
}