From 9d287792c612ecaf65633dd2c0cf71bcc2db2af1 Mon Sep 17 00:00:00 2001 From: Sam Date: Sat, 20 Jul 2024 23:51:10 +0100 Subject: [PATCH] Add tlp power save service to citadel --- hosts/citadel/default.nix | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/hosts/citadel/default.nix b/hosts/citadel/default.nix index 8fc2065..47838ba 100644 --- a/hosts/citadel/default.nix +++ b/hosts/citadel/default.nix @@ -1,4 +1,5 @@ { inputs, lib, pkgs, ... }: +{ inputs, lib, pkgs, config, ... }: let # Disko setup fsType = "btrfs"; # one of ext4 or btrfs. Use btrfs if using impermanence @@ -67,6 +68,19 @@ in XCURSOR_SIZE = "64"; }; + services.tlp = { + enable = true; + settings = { + CPU_SCALING_GOVERNOR_ON_AC = "ondemand"; + CPU_SCALING_GOVERNOR_ON_BAT = "powersave"; + + START_CHARGE_THRESH_BAT0 = 80; + STOP_CHARGE_THRESH_BAT0 = 85; + + USB_BLACKLIST_PHONE = 1; + }; + }; + hardware = { enableRedistributableFirmware = true; firmware = [