summaryrefslogtreecommitdiffstats
path: root/lass/1systems/aergia/physical.nix
diff options
context:
space:
mode:
authorlassulus <git@lassul.us>2023-02-08 15:01:37 +0100
committerlassulus <git@lassul.us>2023-02-08 15:01:37 +0100
commit5b768d2b0050507037584f3b7f4a5cf90d627c57 (patch)
treed5a0d67b68e589ebdcb269516f2d195329356053 /lass/1systems/aergia/physical.nix
parent6781e12eae14618b428b0ccfe2942c826beb800c (diff)
l aergia.r: add suspend to disk
Diffstat (limited to 'lass/1systems/aergia/physical.nix')
-rw-r--r--lass/1systems/aergia/physical.nix14
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
+ '';
}