Hibernation? + battery widget fix for framework 12

This commit is contained in:
Aleksandr Lebedev 2025-07-29 08:45:48 +02:00
parent cc32b7c14f
commit 873a9c562b
4 changed files with 47 additions and 13 deletions

View file

@ -0,0 +1,18 @@
{pkgs, ...}: {
boot = {
kernelParams = [
"resume_offset=533760"
"mem_sleep_default=deep"
];
resumeDevice = "/dev/disk/by-label/nixos";
};
services.logind = {
lidSwitch = "suspend-then-hibernate";
powerKey = "suspend-then-hibernate";
powerKeyLongPress = "poweroff";
};
systemd.sleep.extraConfig = ''
HibernateDelaySec=30m
SuspendState=mem
'';
}