31 lines
848 B
Nix
31 lines
848 B
Nix
{ config, pkgs, ... }:
|
|
|
|
{
|
|
# make the kernel use the correct driver early
|
|
boot.initrd.kernelModules = [ "amdgpu" ];
|
|
|
|
hardware.graphics.enable = true;
|
|
services.xserver.videoDrivers = [ "amdgpu" ];
|
|
|
|
hardware.graphics.enable32Bit = true;
|
|
|
|
hardware.graphics.extraPackages = with pkgs; [
|
|
# Mesa drivers (includes OpenGL, Vulkan via RADV)
|
|
mesa
|
|
|
|
# AMD's official Vulkan driver (optional alternative to RADV)
|
|
amdvlk
|
|
|
|
# OpenCL support - IMPORTANT: Check which OpenCL implementation works for RX 580
|
|
# For R600-family and newer (RX 580 is GCN 4.0, so should use rusticl eventually)
|
|
mesa.opencl # Legacy OpenCL driver (Clover) - being removed soon
|
|
# OR for future-proofing (when rusticl becomes default):
|
|
# pkgs.mesa.rusticl
|
|
|
|
# Video acceleration
|
|
libva
|
|
libva-utils
|
|
vaapiVdpau
|
|
];
|
|
}
|