23 lines
517 B
Nix
Raw Normal View History

2025-05-04 02:47:36 +02:00
{
pkgs,
lib,
config,
...
}:
with lib; let
2025-07-05 00:02:39 +02:00
cfg = config.system.hardware.amdgpu;
2025-05-04 02:47:36 +02:00
in {
2025-07-05 00:02:39 +02:00
options.system.hardware.amdgpu.enable = mkEnableOption "Enables an AMD GPU configuration";
2025-05-04 02:47:36 +02:00
config = mkIf cfg.enable {
systemd.tmpfiles.rules = [
"L+ /opt/rocm/hip - - - - ${pkgs.rocmPackages.clr}"
];
hardware.graphics.extraPackages = with pkgs; [rocmPackages.clr.icd];
2025-07-05 00:02:39 +02:00
environment.systemPackages = with pkgs; [
clinfo
amdgpu_top
nvtopPackages.amd
];
2025-05-04 02:47:36 +02:00
};
}