Files
nix-config/modules/hardware/amdgpu.nix
T
phundrak ba018ef841 refactor: change to litterate config
Configuration is now held by the `.org` files. All `.nix` files are
tangled from the org-mode files.
2026-10-06 12:40:58 +02:00

51 lines
1.2 KiB
Nix

{
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
];
};
in [
"L+ /opt/rocm - - - - ${rocmEnv}"
];
};
environment.variables = {
ROCM_PATH = "/opt/rocm";
HIP_VISIBLE_DEVICES = "1";
ROCM_VISIBLE_DEVICES = "1";
HSA_OVERRIDE_GFX_VERSION = "10.3.0";
};
};
}