Files
nix-config/modules/hardware/amdgpu.nix
T

51 lines
1.2 KiB
Nix
Raw Normal View History

2026-08-20 22:03:24 +02:00
{
2026-10-03 09:56:48 +02:00
flake.modules.nixos.amdgpu = {pkgs, ...}: {
hardware.graphics = {
enable = true;
enable32Bit = true;
};
hardware.amdgpu = {
initrd.enable = true;
opencl.enable = true;
};
hardware.graphics.extraPackages = with pkgs; [
mesa
rocmPackages.clr
rocmPackages.clr.icd
rocmPackages.rocblas
rocmPackages.hipblas
rocmPackages.rpp
nvtopPackages.amd
];
environment.systemPackages = with pkgs; [
clinfo
amdgpu_top
nvtopPackages.amd
];
systemd = {
packages = with pkgs; [lact];
services.lactd.wantedBy = ["multi-user.target"];
tmpfiles.rules = let
rocmEnv = pkgs.symlinkJoin {
name = "rocm-combined";
paths = with pkgs.rocmPackages; [
clr
clr.icd
rocblas
hipblas
rpp
2026-08-20 22:03:24 +02:00
];
};
2026-10-03 09:56:48 +02:00
in [
"L+ /opt/rocm - - - - ${rocmEnv}"
];
2026-08-20 22:03:24 +02:00
};
2026-10-03 09:56:48 +02:00
environment.variables = {
ROCM_PATH = "/opt/rocm";
HIP_VISIBLE_DEVICES = "1";
ROCM_VISIBLE_DEVICES = "1";
HSA_OVERRIDE_GFX_VERSION = "10.3.0";
};
};
2026-08-20 22:03:24 +02:00
}