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";