Commit 4316033

HPCesia <me@hpcesia.com>
2026-10-20 01:10:51
hosts: enable zswap or zram for hosts
1 parent 93778d9
Changed files (5)
modules
modules/hosts/cyrene/file-system.nix
@@ -12,5 +12,15 @@
       den.aspects.disk.btrfs-disko
       den.aspects.disk.preservation
     ];
+
+    nixos = {
+      boot.zswap = {
+        enable = true;
+        maxPoolPercent = 50;
+        shrinkerEnabled = true;
+        compressor = "zstd";
+        acceptThresholdPercent = 90;
+      };
+    };
   };
 }
modules/hosts/hyacine/file-system.nix
@@ -11,5 +11,9 @@
       den.aspects.disk.btrfs-disko
       den.aspects.disk.preservation
     ];
+
+    nixos = {
+      zramSwap.enable = true;
+    };
   };
 }
modules/hosts/kevin/file-system.nix
@@ -11,5 +11,15 @@
       den.aspects.disk.btrfs-disko
       den.aspects.disk.preservation
     ];
+
+    nixos = {
+      boot.zswap = {
+        enable = true;
+        maxPoolPercent = 50;
+        shrinkerEnabled = true;
+        compressor = "zstd";
+        acceptThresholdPercent = 90;
+      };
+    };
   };
 }
modules/hosts/mobius/file-system.nix
@@ -10,5 +10,15 @@
       den.aspects.disk.btrfs-disko
       den.aspects.disk.preservation
     ];
+
+    nixos = {
+      boot.zswap = {
+        enable = true;
+        maxPoolPercent = 50;
+        shrinkerEnabled = true;
+        compressor = "zstd";
+        acceptThresholdPercent = 90;
+      };
+    };
   };
 }
modules/hosts/tribios/file-system.nix
@@ -1,6 +1,8 @@
 {den, ...}: {
-  den.hosts.tribios = {
-    settings.disk.preservation.btrfs.partId = "/dev/disk/by-uuid/9886235f-5a74-41e8-919b-9e4096a7cb9e";
+  den.hosts.tribios.settings = {
+    disk.preservation.btrfs = {
+      partId = "/dev/disk/by-uuid/9886235f-5a74-41e8-919b-9e4096a7cb9e";
+    };
   };
 
   den.aspects.tribios = {
@@ -55,6 +57,8 @@
           neededForBoot = true;
         };
       };
+
+      zramSwap.enable = true;
     };
   };
 }