Files
nix/hosts/battleship/gpu.nix

28 lines
632 B
Nix

{pkgs, ...}: {
services.xserver.videoDrivers = ["amdgpu"];
boot.kernelModules = ["amdgpu"];
boot.initrd.kernelModules = ["amdgpu"];
# AMD
hardware.graphics.enable = true;
hardware.graphics.enable32Bit = true;
hardware.amdgpu.opencl.enable = true;
environment.systemPackages = with pkgs; [clinfo];
environment.variables.ROC_ENABLE_PRE_VEGA = "1";
systemd.tmpfiles.rules = let
rocmEnv = pkgs.symlinkJoin {
name = "rocm-combuned";
paths = with pkgs.rocmPackages; [
rocblas
hipblas
clr
];
};
in [
"L+ /opt/rocm - - - - ${rocmEnv}"
];
}