22 lines
642 B
Nix
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";
|
|
};
|
|
}
|