# OramaOS disk image layout
#
# Partition table:
#   sda1 — rootfs-A (SquashFS + dm-verity, read-only)
#   sda2 — rootfs-B (standby for A/B updates, same size)
#   sda3 — data (formatted as LUKS2 during enrollment)
#
# EFI System Partition contains systemd-boot + kernel.

image efi-part.vfat {
	vfat {
		files = {
			"bzImage" = "EFI/Linux/vmlinuz"
		}
	}

	size = 64M
}

image rootfs-a.img {
	hdimage {}

	partition rootfs-a {
		image = "rootfs.squashfs"
	}
}

image orama-os.img {
	hdimage {
		gpt = true
	}

	# EFI System Partition (systemd-boot + kernel)
	partition esp {
		image = "efi-part.vfat"
		partition-type-uuid = "c12a7328-f81f-11d2-ba4b-00a0c93ec93b"
		bootable = true
		size = 64M
	}

	# rootfs-A (active partition)
	partition rootfs-a {
		image = "rootfs.squashfs"
		partition-type-uuid = "0fc63daf-8483-4772-8e79-3d69d8477de4"
		size = 2G
	}

	# rootfs-B (standby for A/B updates)
	partition rootfs-b {
		partition-type-uuid = "0fc63daf-8483-4772-8e79-3d69d8477de4"
		size = 2G
	}

	# Data partition (LUKS2 encrypted during enrollment)
	# Fills remaining disk space on the target VPS.
	partition data {
		partition-type-uuid = "0fc63daf-8483-4772-8e79-3d69d8477de4"
		size = 10G
	}
}
