summaryrefslogtreecommitdiffstats
path: root/lass/2configs/hw
diff options
context:
space:
mode:
Diffstat (limited to 'lass/2configs/hw')
-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 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
+ '';
+
}