nix/module/AmdCompute.nix
2024-11-06 01:07:30 +03:00

19 lines
429 B
Nix

{
config,
lib,
pkgs,
...
}: let
cfg = config.module.amd.compute;
in {
options.module.amd.compute.enable = lib.mkEnableOption "the AMD Rocm support i.e. for Blender.";
config = lib.mkIf cfg.enable {
nixpkgs.config.rocmSupport = true;
systemd.tmpfiles.rules = [ "L+ /opt/rocm/hip - - - - ${pkgs.rocmPackages.clr}" ];
hardware.graphics.extraPackages = with pkgs; [
rocmPackages.clr.icd
];
};
}