Files
nixos-config/modules/system/hardware-amd.nix

37 lines
1.1 KiB
Nix

{ config, pkgs, lib, ... }:
{
# CPU: AMD Ryzen 9 9950X3D (Zen 5)
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
hardware.enableRedistributableFirmware = true;
# GPU: AMD Radeon RX 9070 (RDNA 4 / Navi 48). The kernel `amdgpu` driver handles
# both the discrete card and the Granite Ridge iGPU. Make sure it's loaded early
# so KMS works from the initrd.
boot.initrd.kernelModules = [ "amdgpu" ];
services.xserver.videoDrivers = [ "amdgpu" ];
# Mesa + Vulkan + VA-API (video accel). 25.11 ships Mesa new enough for RDNA 4.
# RADV (from Mesa) is the default Vulkan driver. AMDVLK was removed upstream.
hardware.graphics = {
enable = true;
enable32Bit = true;
extraPackages = with pkgs; [
rocmPackages.clr.icd # OpenCL ICD on top of ROCm
];
};
# ROCm / OpenCL tooling for the dGPU (optional but cheap to have).
systemd.tmpfiles.rules = [
"L+ /opt/rocm/hip - - - - ${pkgs.rocmPackages.clr}"
];
# Sensors + microcode/firmware utilities.
environment.systemPackages = with pkgs; [
lm_sensors
pciutils
usbutils
radeontop
];
}