nix-dotfiles/modules/hardware/graphics/amdgpu.nix
2026-04-30 17:19:46 -07:00

22 lines
642 B
Nix

{ pkgs, config, lib, inputs, ... }:
with lib;
let
cfg = config.modules.hardware.graphics.amdgpu;
in {
options.modules.hardware.graphics.amdgpu = {
enable = mkEnableOption "Enable AMD graphics drivers, used in conjuction with nixos-hardware";
overclock = mkEnableOption "Enable overclocking on AMD graphics drivers";
};
config = mkIf cfg.enable {
hardware.amdgpu.opencl.enable = true;
hardware.amdgpu.overdrive.enable = cfg.overclock;
services.lact.enable = cfg.overclock;
environment.systemPackages = with pkgs; [ amdgpu_top ];
# radv > amdvlk
environment.variables.AMD_VULKAN_ICD = "RADV";
};
}