diff options
author | lassulus <git@lassul.us> | 2023-02-08 15:01:37 +0100 |
---|---|---|
committer | lassulus <git@lassul.us> | 2023-02-08 15:01:37 +0100 |
commit | 5b768d2b0050507037584f3b7f4a5cf90d627c57 (patch) | |
tree | d5a0d67b68e589ebdcb269516f2d195329356053 | |
parent | 6781e12eae14618b428b0ccfe2942c826beb800c (diff) |
l aergia.r: add suspend to disk
-rw-r--r-- | lass/1systems/aergia/physical.nix | 14 |
1 files changed, 13 insertions, 1 deletions
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 + ''; } |