summaryrefslogtreecommitdiffstats
path: root/lenovo
diff options
context:
space:
mode:
authorAlberto Berti <alberto@metapensiero.it>2018-05-31 18:04:02 +0200
committerAlberto Berti <alberto@metapensiero.it>2018-05-31 18:04:02 +0200
commite0a8e0107321a86e307e9c01d91bd27b03d665d7 (patch)
tree235a6af4db8d542912c4fa4becaa83efdcc5fd3b /lenovo
parentd0a8097eec8cabbcd50fcff20548d7882feb7d8b (diff)
Give TLP more control over the battery and enable battery life saver parameters
Diffstat (limited to 'lenovo')
-rw-r--r--lenovo/thinkpad/x1/6th-gen/QHD/default.nix17
1 files changed, 17 insertions, 0 deletions
diff --git a/lenovo/thinkpad/x1/6th-gen/QHD/default.nix b/lenovo/thinkpad/x1/6th-gen/QHD/default.nix
index 55438fd..1122d77 100644
--- a/lenovo/thinkpad/x1/6th-gen/QHD/default.nix
+++ b/lenovo/thinkpad/x1/6th-gen/QHD/default.nix
@@ -1,9 +1,26 @@
# X1 6th generation with a QHD (2560x1440px) display
+{ config, ... }:
+
{
imports = [
../.
];
+ # give tlp more control over battery
+ boot = {
+ extraModulePackages = with config.boot.kernelPackages; [
+ acpi_call
+ ];
+ kernelModules = [
+ "acpi_call"
+ ];
+ };
+ # see https://linrunner.de/en/tlp/docs/tlp-faq.html#battery
+ services.tlp.extraConfig = ''
+START_CHARGE_THRESH_BAT0=75
+STOP_CHARGE_THRESH_BAT0=80
+'';
+ # fix font sizes in X
services.xserver.dpi = 210;
fonts.fontconfig.dpi = 210;
}