From d9747c64b038943253eaafdc59a49d5face46dab Mon Sep 17 00:00:00 2001 From: Fuwn Date: Fri, 20 Sep 2024 05:36:20 -0700 Subject: modules: server and core modules --- modules/core/hardware/cpu.nix | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 modules/core/hardware/cpu.nix (limited to 'modules/core/hardware/cpu.nix') diff --git a/modules/core/hardware/cpu.nix b/modules/core/hardware/cpu.nix new file mode 100644 index 0000000..1ac3a27 --- /dev/null +++ b/modules/core/hardware/cpu.nix @@ -0,0 +1,21 @@ +{ pkgs, config, ... }: +{ + environment.systemPackages = [ pkgs.amdctl ]; + + powerManagement = { + enable = true; + cpuFreqGovernor = "performance"; + }; + + boot = { + kernelModules = [ + # "kvm-amd" + "amd-pstate" + "zenpower" + "msr" + ]; + + kernelParams = [ "amd_iommu=on" ]; + extraModulePackages = [ config.boot.kernelPackages.zenpower ]; + }; +} -- cgit v1.2.3