flake/common/amd.nix

25 lines
584 B
Nix

{ config, pkgs, ... }:
{
boot.initrd.kernelModules = [ "amdgpu" ];
services.xserver.videoDrivers = [ "amdgpu" ];
# Enable OpenCL & Vulkan
hardware.opengl.driSupport = true;
hardware.opengl.driSupport32Bit = true;
hardware.opengl.extraPackages = with pkgs; [
rocm-opencl-icd
rocm-opencl-runtime
amdvlk
];
# Enable HIP
systemd.tmpfiles.rules = [
## Replaced `hip` in favor of `rocmPackages.clr`
##"L+ /opt/rocm/hip - - - - ${pkgs.hip}"
"L+ /opt/rocm/hip - - - - ${pkgs.rocmPackages.clr}"
];
}