chore: refactor system modules
This commit is contained in:
22
system/hardware/amdgpu.nix
Normal file
22
system/hardware/amdgpu.nix
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.system.hardware.amdgpu;
|
||||
in {
|
||||
options.system.hardware.amdgpu.enable = mkEnableOption "Enables an AMD GPU configuration";
|
||||
config = mkIf cfg.enable {
|
||||
systemd.tmpfiles.rules = [
|
||||
"L+ /opt/rocm/hip - - - - ${pkgs.rocmPackages.clr}"
|
||||
];
|
||||
hardware.graphics.extraPackages = with pkgs; [rocmPackages.clr.icd];
|
||||
environment.systemPackages = with pkgs; [
|
||||
clinfo
|
||||
amdgpu_top
|
||||
nvtopPackages.amd
|
||||
];
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user