package initramfs-image {
	description = "Rosa OS initramfs image";
	version = unversioned;
	exclude = true;

	source = earlyinit;
	files = {
		"initramfs";
	};
	exec = generic {
		build = "gen_init_cpio "+
			"-t 4294967295 "+
			"-c /usr/src/initramfs | "+
			"zstd > /work/initramfs.zst";
	};

	inputs = [
		zstd,
		gen_init_cpio,
	];
}

package system-image {
	description = "Rosa OS system image";
	version = unversioned;
	exclude = true;

	source = earlyinit;
	extra = [
		musl,
		mksh,
		toybox,

		kmod,
		kernel,
		firmware,
	];
	overlay = "/mnt";

	exec = generic {
		build = "mksquashfs /mnt/system /work/system.img";
	};

	inputs = [ squashfs-tools ];
}
