update amd config
This commit is contained in:
parent
ba4d19eb5c
commit
0861077bba
2 changed files with 19 additions and 12 deletions
|
@ -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" ];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -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
|
||||
;
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue