From 7d9461808ce40761bbaa73cf27d64a4e89a8e9b0 Mon Sep 17 00:00:00 2001 From: Pierre Bourdon Date: Sat, 13 Jul 2024 04:40:51 +0200 Subject: [PATCH] builders: configure a swapfile + zswap --- services/baremetal-builder/default.nix | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/services/baremetal-builder/default.nix b/services/baremetal-builder/default.nix index 72443b3..af661fa 100644 --- a/services/baremetal-builder/default.nix +++ b/services/baremetal-builder/default.nix @@ -51,6 +51,18 @@ in options = [ "fmask=0022" "dmask=0022" ]; }; + swapDevices = [ + { + device = "/swapfile"; + size = 50 * 1024; # 50GiB + } + ]; + + zramSwap = { + enable = true; + memoryPercent = 25; + }; + boot.kernelParams = [ "console=ttyS0,115200" "console=tty1"