Add swapfile to AMI base

This commit is contained in:
Timothy J. Aveni
2026-06-29 22:43:46 -07:00
parent 30d6ba2332
commit ab5aec5f40
+12
View File
@@ -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";