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; 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 = { # https://github.com/NixOS/nixos-hardware/blob/master/common/cpu/amd/zenpower.nix
# enable = true; blacklistedKernelModules = [ "k10temp" ];
# settings.Settings = { extraModulePackages = [ config.boot.kernelPackages.zenpower ];
# epp_state_for_AC = "performance"; kernelModules = [ "zenpower" ];
# epp_state_for_BAT = "balance_power"; };
# };
# };
} }

View file

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