42 lines
1.1 KiB
Nix
42 lines
1.1 KiB
Nix
# AMD CPU + Radeon GPU. The nixos-hardware profiles (common-cpu-amd, -pstate,
|
|
# -gpu-amd, -pc-ssd) are imported by the host (modules/hosts/<name>/hardware.nix);
|
|
# defaults that overlap use mkDefault. The ROCm/HIP compute stack is a separate
|
|
# aspect (hardware/rocm.nix).
|
|
{
|
|
flake.modules.nixos.amd =
|
|
{ lib, pkgs, ... }:
|
|
{
|
|
hardware = {
|
|
graphics = {
|
|
enable = true;
|
|
# Steam/Proton and Wine need the 32-bit Mesa drivers.
|
|
enable32Bit = true;
|
|
};
|
|
|
|
amdgpu = {
|
|
initrd.enable = lib.mkDefault true;
|
|
opencl.enable = true;
|
|
# LACT needs the overdrive bit in amdgpu.ppfeaturemask to tune clocks.
|
|
overdrive.enable = true;
|
|
};
|
|
|
|
cpu.amd.updateMicrocode = lib.mkDefault true;
|
|
};
|
|
|
|
boot.kernelModules = [ "kvm-amd" "tun" ];
|
|
|
|
# LACT: GPU monitoring, fan curves and overclocking.
|
|
services.lact.enable = true;
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
pciutils
|
|
usbutils
|
|
vulkan-tools
|
|
mesa-demos
|
|
radeontop
|
|
nvtopPackages.amd
|
|
lm_sensors
|
|
];
|
|
};
|
|
}
|