update amd config

This commit is contained in:
jacekpoz 2024-09-01 23:31:57 +02:00
parent ba4d19eb5c
commit 0861077bba
Signed by: poz
SSH key fingerprint: SHA256:JyLeVWE4bF3tDnFeUpUaJsPsNlJyBldDGV/dIKSLyN8
2 changed files with 19 additions and 12 deletions

View file

@ -1,13 +1,16 @@
_: {
{
config,
...
}: {
hardware.cpu.amd.updateMicrocode = true;
boot.initrd.kernelModules = [ "amdgpu" ];
boot = {
# https://github.com/NixOS/nixos-hardware/blob/master/common/cpu/amd/pstate.nix
kernelParams = [ "amd_pstate=active" ];
# services.auto-epp = {
# enable = true;
# settings.Settings = {
# epp_state_for_AC = "performance";
# epp_state_for_BAT = "balance_power";
# };
# };
# https://github.com/NixOS/nixos-hardware/blob/master/common/cpu/amd/zenpower.nix
blacklistedKernelModules = [ "k10temp" ];
extraModulePackages = [ config.boot.kernelPackages.zenpower ];
kernelModules = [ "zenpower" ];
};
}

View file

@ -5,25 +5,29 @@
}: let
inherit (lib.attrsets) attrValues;
in {
# https://github.com/NixOS/nixos-hardware/blob/master/common/gpu/amd/default.nix
services.xserver.videoDrivers = [ "modesetting" ];
hardware = {
amdgpu = {
initrd.enable = true;
opencl.enable = true;
};
graphics = {
enable = true;
enable32Bit = true;
extraPackages = attrValues {
inherit (pkgs)
mesa
amdvlk
libdrm
libva
vaapiVdpau
libvdpau-va-gl
;
inherit (pkgs.rocmPackages.clr) icd;
};
extraPackages32 = attrValues {
inherit (pkgs.driversi686Linux)
mesa
amdvlk
libvdpau-va-gl
;
};