From a66524069868283d1a9de43383121966c0d36853 Mon Sep 17 00:00:00 2001 From: Petru Paler Date: Fri, 30 Jun 2023 11:07:27 +0100 Subject: [PATCH] Switch to ondemand cpufreq governor. --- hosts/c1/hardware.nix | 1 - hosts/c2/hardware.nix | 1 - hosts/c3/hardware.nix | 1 - hosts/common/global/cpufreq.nix | 3 +++ hosts/common/global/default.nix | 1 + 5 files changed, 4 insertions(+), 3 deletions(-) create mode 100644 hosts/common/global/cpufreq.nix diff --git a/hosts/c1/hardware.nix b/hosts/c1/hardware.nix index c7362af..979e25a 100644 --- a/hosts/c1/hardware.nix +++ b/hosts/c1/hardware.nix @@ -54,6 +54,5 @@ # networking.interfaces.eno1.useDHCP = lib.mkDefault true; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; } diff --git a/hosts/c2/hardware.nix b/hosts/c2/hardware.nix index 74b8dd0..ff09941 100644 --- a/hosts/c2/hardware.nix +++ b/hosts/c2/hardware.nix @@ -54,6 +54,5 @@ # networking.interfaces.eno1.useDHCP = lib.mkDefault true; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; } diff --git a/hosts/c3/hardware.nix b/hosts/c3/hardware.nix index 9bb77a6..63346d5 100644 --- a/hosts/c3/hardware.nix +++ b/hosts/c3/hardware.nix @@ -54,6 +54,5 @@ # networking.interfaces.eno1.useDHCP = lib.mkDefault true; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; } diff --git a/hosts/common/global/cpufreq.nix b/hosts/common/global/cpufreq.nix new file mode 100644 index 0000000..1f33b57 --- /dev/null +++ b/hosts/common/global/cpufreq.nix @@ -0,0 +1,3 @@ +{ + powerManagement.cpuFreqGovernor = "ondemand"; +} diff --git a/hosts/common/global/default.nix b/hosts/common/global/default.nix index 0e0f94b..afe7cab 100644 --- a/hosts/common/global/default.nix +++ b/hosts/common/global/default.nix @@ -1,6 +1,7 @@ { imports = [ ./boot.nix + ./cpufreq.nix ./flakes.nix ./locale.nix ./network.nix