Add kernel settings and tweak TLP to improve battery life

This commit is contained in:
Martin Larsson 2025-06-15 14:43:48 +02:00
parent 108f68cd96
commit f6af733634

View file

@ -1,11 +1,15 @@
{ apple-silicon-support, pkgs, ... }:
{ apple-silicon-support, ... }:
{
imports = [
apple-silicon-support.nixosModules.apple-silicon-support
];
boot = {
kernelParams = [ "apple_dcp.show_notch=0" ];
kernelParams = [
"apple_dcp.show_notch=0"
"cpuidle.off=0"
"mem_sleep_default=deep"
];
loader.efi.canTouchEfiVariables = false;
};
@ -19,6 +23,14 @@
networking.hostName = "asahi-nixos";
services = {
tlp.enable = true;
tlp = {
enable = true;
settings = {
SOUND_POWER_SAVE_ON_BAT = 1;
RUNTIME_PM_ON_BAT = "auto";
WIFI_PWR_ON_BAT = "on";
WOL_DISABLE = "Y";
};
};
};
}