wip: various changes to modularization and laptop

This commit is contained in:
2025-12-24 18:38:03 +00:00
parent 1528eee84e
commit 8cb2e05312
4 changed files with 105 additions and 24 deletions

View File

@@ -0,0 +1,29 @@
{ ... }:
{
services.tlp = {
enable = true;
extraConfig = ''
CPU_SCALING_GOVERNOR_ON_BAT=power_save
CPU_SCALING_GOVERNOR_ON_AC=performance
PCIE_ASPM_ON_AC=performance
PCIE_ASPM_ON_BAT=powersave
'';
settings = {
START_CHARGE_THRESH_BAT0 = 40; # 40 and below it starts to charge
STOP_CHARGE_THRESH_BAT0 = 80; # 80 and above it stops charging
};
};
powerManagement.powertop.enable = true;
services.thermald.enable = true;
services.upower = {
enable = true;
};
services.logind.extraConfig = {
HandlePowerKey = "hibernate"; # Hibernate when the power button is pressed
HandleLidSwitch = "hibernate"; # Hibernate when the lid is closed
};
systemd.sleep = {
hibernate = true;
hybridSleep = true;
};
}