l aergia.r: add suspend to disk

This commit is contained in:
lassulus 2023-02-08 15:01:37 +01:00
parent 6781e12eae
commit 5b768d2b00

View File

@ -25,6 +25,9 @@
# for ryzenadj -i # for ryzenadj -i
"iomem=relaxed" "iomem=relaxed"
# suspend
"resume_offset=178345675"
]; ];
boot.kernelModules = [ boot.kernelModules = [
@ -119,8 +122,17 @@
''; '';
# ignore power key # ignore power key
services.logind.extraConfig = "HandlePowerKey=ignore";
# update cpu microcode # update cpu microcode
hardware.cpu.amd.updateMicrocode = true; hardware.cpu.amd.updateMicrocode = true;
# suspend to disk
swapDevices = [{
device = "/swapfile";
}];
boot.resumeDevice = "/dev/mapper/aergia1";
services.logind.lidSwitch = "suspend-then-hibernate";
services.logind.extraConfig = ''
HandlePowerKey=hibernate
'';
} }