This commit is contained in:
2026-05-08 14:40:12 +09:00
parent e81e3be023
commit 7d1436ac54
4 changed files with 62 additions and 28 deletions

View File

@@ -15,7 +15,38 @@ in {
./programs/hyprland.nix
];
services.logind.lidSwitch = "suspend";
services.logind = {
lidSwitch = "suspend-then-hibernate";
lidSwitchExternalPower = "suspend";
lidSwitchDocked = "ignore";
powerKey = "poweroff";
powerKeyLongPress = "poweroff";
};
systemd.sleep.extraConfig = ''
HibernateDelaySec=30min
SuspendState=mem
'';
services.tlp = {
enable = true;
settings = {
CPU_SCALING_GOVERNOR_ON_AC = "performance";
CPU_SCALING_GOVERNOR_ON_BAT = "powersave";
CPU_ENERGY_PERF_POLICY_ON_BAT = "power";
CPU_ENERGY_PERF_POLICY_ON_AC = "performance";
CPU_BOOST_ON_BAT = 0;
CPU_BOOST_ON_AC = 1;
PLATFORM_PROFILE_ON_AC = "performance";
PLATFORM_PROFILE_ON_BAT = "low-power";
START_CHARGE_THRESH_BAT0 = 75;
STOP_CHARGE_THRESH_BAT0 =
80; # remove these two if your laptop doesn't support charge thresholds
};
};
powerManagement.enable = true;
services.power-profiles-daemon.enable = false;
nixpkgs.config.allowUnfree = true;