diff options
author | lassulus <lassulus@lassul.us> | 2019-10-14 15:37:25 +0200 |
---|---|---|
committer | lassulus <lassulus@lassul.us> | 2019-10-14 15:37:25 +0200 |
commit | 974676fd1a9cb12472babb784471431c9784cb04 (patch) | |
tree | 562ecdcef0683fa8dd571de9e7d0d5aca2337e14 | |
parent | f1e5a25389780a54d5a8786ac092d860c24590cf (diff) |
l hw x220: stop charging at 90%
-rw-r--r-- | lass/2configs/hw/x220.nix | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/lass/2configs/hw/x220.nix b/lass/2configs/hw/x220.nix index 5649041f9..89b119347 100644 --- a/lass/2configs/hw/x220.nix +++ b/lass/2configs/hw/x220.nix @@ -1,4 +1,4 @@ -{ ... }: +{ config, pkgs, ... }: { imports = [ <stockholm/krebs/2configs/hw/x220.nix> @@ -8,7 +8,20 @@ initrd.luks.devices = [ { name = "luksroot"; device = "/dev/sda3"; } ]; initrd.luks.cryptoModules = [ "aes" "sha512" "sha1" "xts" ]; initrd.availableKernelModules = [ "xhci_hcd" "ehci_pci" "ahci" "usb_storage" ]; + extraModulePackages = [ + config.boot.kernelPackages.tp_smapi + config.boot.kernelPackages.acpi_call + ]; + kernelModules = [ + "acpi_call" + "tp_smapi" + ]; }; + + environment.systemPackages = [ + pkgs.tpacpi-bat + ]; + fileSystems = { "/" = { device = "/dev/mapper/pool-root"; @@ -33,4 +46,10 @@ services.logind.lidSwitch = "ignore"; services.logind.lidSwitchDocked = "ignore"; + services.tlp.enable = true; + services.tlp.extraConfig = '' + START_CHARGE_THRESH_BAT0=80 + STOP_CHARGE_THRESH_BAT0=95 + ''; + } |