From 5b768d2b0050507037584f3b7f4a5cf90d627c57 Mon Sep 17 00:00:00 2001 From: lassulus Date: Wed, 8 Feb 2023 15:01:37 +0100 Subject: l aergia.r: add suspend to disk --- lass/1systems/aergia/physical.nix | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/lass/1systems/aergia/physical.nix b/lass/1systems/aergia/physical.nix index 44bd53c22..0e5a88aa1 100644 --- a/lass/1systems/aergia/physical.nix +++ b/lass/1systems/aergia/physical.nix @@ -25,6 +25,9 @@ # for ryzenadj -i "iomem=relaxed" + + # suspend + "resume_offset=178345675" ]; boot.kernelModules = [ @@ -119,8 +122,17 @@ ''; # ignore power key - services.logind.extraConfig = "HandlePowerKey=ignore"; # update cpu microcode 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 + ''; } -- cgit v1.2.3