From 60315746b9c1f63f8d28adf4a084a2499c971995 Mon Sep 17 00:00:00 2001 From: iFargle Date: Sun, 19 Nov 2023 17:34:23 +0900 Subject: [PATCH] Add TLP config to the framework laptop --- nixos/common/services/tlp.nix | 13 +++++++++++++ nixos/hosts/nixos-framework/default.nix | 3 ++- 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 nixos/common/services/tlp.nix diff --git a/nixos/common/services/tlp.nix b/nixos/common/services/tlp.nix new file mode 100644 index 00000000..3525e569 --- /dev/null +++ b/nixos/common/services/tlp.nix @@ -0,0 +1,13 @@ +{ ... }: { + services.tlp = { + enable = true; + settings = { + CPU_BOOST_ON_BAT = 0; + CPU_SCALING_GOVERNOR_ON_BATTERY = "powersave"; + # Specific to the Framework, since I have it limited to 80% charge in the BIOS + START_CHARGE_THRESH_BAT0 = 70; + STOP_CHARGE_THRESH_BAT0 = 79; + RUNTIME_PM_ON_BAT = "auto"; + }; + }; +} \ No newline at end of file diff --git a/nixos/hosts/nixos-framework/default.nix b/nixos/hosts/nixos-framework/default.nix index 869be72a..0f73eaa5 100644 --- a/nixos/hosts/nixos-framework/default.nix +++ b/nixos/hosts/nixos-framework/default.nix @@ -3,9 +3,10 @@ inputs.nixos-hardware.nixosModules.framework-13th-gen-intel (modulesPath + "/installer/scan/not-detected.nix") ./disks.nix - ../../common/services/powertop.nix ../../common/modules/secureboot.nix + ../../common/services/powertop.nix ../../common/services/fwupd.nix + ../../common/services.tlp.nix ]; # steam , etc