l hw x220: stop charging at 90%

This commit is contained in:
lassulus 2019-10-14 15:37:25 +02:00
parent f1e5a25389
commit 974676fd1a

View file

@ -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
'';
}