From f6988202567bc5550d412f5e70125cd5e049a501 Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Mon, 1 May 2023 19:42:25 -0700 Subject: profiles/laptop: consolidate services related to laptop --- profiles/laptop.nix | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 profiles/laptop.nix (limited to 'profiles/laptop.nix') diff --git a/profiles/laptop.nix b/profiles/laptop.nix new file mode 100644 index 0000000..6b8211a --- /dev/null +++ b/profiles/laptop.nix @@ -0,0 +1,13 @@ +{ pkgs, config, lib, ... }: +{ + services.thermald.enable = true; + services.tlp.enable = true; + services.tlp.settings = { + CPU_SCALING_GOVERNOR_ON_AC = "schedutil"; + CPU_SCALING_GOVERNOR_ON_BAT = "schedutil"; + + # Keep charge between 60% and 80% to preserve battery life + START_CHARGE_THRESH_BAT0 = 60; + STOP_CHARGE_THRESH_BAT0 = 80; + }; +} -- cgit 1.4.1