From bfbf0cea68a8ab950cacbccaef30d6ff3a567733 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torjus=20H=C3=A5kestad?= Date: Sun, 8 Feb 2026 13:34:08 +0100 Subject: [PATCH] template2: enable zram for bootstrap Prevents OOM during initial nixos-rebuild on 2GB VMs. Co-Authored-By: Claude Opus 4.5 --- hosts/template2/configuration.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hosts/template2/configuration.nix b/hosts/template2/configuration.nix index be8e80d..ea7def3 100644 --- a/hosts/template2/configuration.nix +++ b/hosts/template2/configuration.nix @@ -79,5 +79,8 @@ # Or disable the firewall altogether. networking.firewall.enable = false; + # Compressed swap in RAM - prevents OOM during bootstrap nixos-rebuild + zramSwap.enable = true; + system.stateVersion = "25.11"; }