From ab5aec5f405bf3de3293ef54924e9a13d2772326 Mon Sep 17 00:00:00 2001 From: "Timothy J. Aveni" Date: Mon, 29 Jun 2026 22:43:46 -0700 Subject: [PATCH] Add swapfile to AMI base --- user-data.sh.tftpl | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/user-data.sh.tftpl b/user-data.sh.tftpl index b682487..0f9cd00 100644 --- a/user-data.sh.tftpl +++ b/user-data.sh.tftpl @@ -30,6 +30,12 @@ write_bootstrap_config() { nix.settings.experimental-features = [ "nix-command" "flakes" ]; boot.supportedFilesystems = [ "zfs" ]; boot.zfs.forceImportRoot = false; + swapDevices = [ + { + device = "/swapfile"; + size = 4096; + } + ]; environment.systemPackages = [ pkgs.git @@ -77,6 +83,12 @@ write_final_config() { boot.supportedFilesystems = [ "zfs" ]; boot.zfs.extraPools = [ "${nix_pool}" ]; boot.zfs.forceImportRoot = false; + swapDevices = [ + { + device = "/swapfile"; + size = 4096; + } + ]; fileSystems."/nix" = { device = "${nix_pool}/nix";