2024-06-25 04:04:39 +03:00
|
|
|
{ pkgs, lib, config, ... }: with lib; let
|
|
|
|
cfg = config.module.amd.compute;
|
|
|
|
in {
|
|
|
|
options = {
|
|
|
|
module.amd.compute.enable = mkEnableOption "Enable AMD Rocm support i.e. for Blender.";
|
|
|
|
};
|
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
nixpkgs.config.rocmSupport = true;
|
|
|
|
systemd.tmpfiles.rules = [
|
|
|
|
"L+ /opt/rocm/hip - - - - ${pkgs.rocmPackages.clr}"
|
|
|
|
];
|
2024-06-26 09:28:51 +03:00
|
|
|
hardware.graphics.extraPackages = with pkgs; [
|
2024-06-25 04:04:39 +03:00
|
|
|
rocmPackages.clr.icd
|
|
|
|
];
|
|
|
|
};
|
2024-03-20 22:54:40 +03:00
|
|
|
}
|