about summary refs log tree commit diff stats
path: root/system/disks/default.nix
diff options
context:
space:
mode:
authorSoispha <soispha@vhack.eu>2023-07-11 19:18:34 +0200
committerSoispha <soispha@vhack.eu>2023-07-11 20:49:16 +0200
commit22333b9f27aa26ebafed1b8230d5e75edcf495a4 (patch)
treec9c4d276a5f4b3126c849bbfd8b02528db4aa6ac /system/disks/default.nix
parentFix(hm/conf/ssh): Only connect to codeberg.org over ipv4 (ipv6 failed) (diff)
downloadnixos-config-22333b9f27aa26ebafed1b8230d5e75edcf495a4.tar.gz
nixos-config-22333b9f27aa26ebafed1b8230d5e75edcf495a4.zip
Fix(system/disks/hibernate): Try to activate it
Diffstat (limited to 'system/disks/default.nix')
-rw-r--r--system/disks/default.nix22
1 files changed, 12 insertions, 10 deletions
diff --git a/system/disks/default.nix b/system/disks/default.nix
index 71a43667..28797f2c 100644
--- a/system/disks/default.nix
+++ b/system/disks/default.nix
@@ -108,20 +108,22 @@ in {
       };
     };
     swapDevices = [
-      {
-        device = "/swap/swapfile";
-        priority = 1; # lower than zramSwap, just in case
-        # size = 2048; # TODO can nixos create a btrfs swapfile correctly?
-      }
+      #{
+      #        device = "/swap/swapfile";
+      #        priority = 1; # lower than zramSwap, just in case
+      #        # size = 2048; # TODO can nixos create a btrfs swapfile correctly?
+      #}
     ];
     zramSwap = {
       enable = true;
       priority = 10; # needs to be higher than hardware-swap
     };
-    boot.kernelParams = [
-      "resume=UUID=${cfg.swap.uuid}"
-      "resume_offset=${cfg.swap.resumeOffset}"
-      "zswap.enabled=0" # zswap and zram are not really compatible
-    ];
+    boot = {
+      kernelParams = [
+        "resume_offset=${cfg.swap.resumeOffset}"
+        "zswap.enabled=0" # zswap and zram are not really compatible
+      ];
+      resumeDevice = "/dev/disk/by-uuid/${cfg.swap.uuid}";
+    };
   };
 }