Add gpu-config.nix
This commit is contained in:
30
gpu-config.nix
Normal file
30
gpu-config.nix
Normal file
@@ -0,0 +1,30 @@
|
||||
{ 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
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user