summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlassulus <lassulus@lassul.us>2019-10-14 15:37:25 +0200
committerlassulus <lassulus@lassul.us>2019-10-14 15:37:25 +0200
commit974676fd1a9cb12472babb784471431c9784cb04 (patch)
tree562ecdcef0683fa8dd571de9e7d0d5aca2337e14
parentf1e5a25389780a54d5a8786ac092d860c24590cf (diff)
l hw x220: stop charging at 90%
-rw-r--r--lass/2configs/hw/x220.nix21
1 files changed, 20 insertions, 1 deletions
diff --git a/lass/2configs/hw/x220.nix b/lass/2configs/hw/x220.nix
index 5649041f..89b11934 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
+ '';
+
}