Files
Pigeon/vmconfig.nix
T

45 lines
980 B
Nix
Raw Normal View History

2026-10-15 01:10:33 -04:00
{
writeText,
pigeon-kernel,
2026-10-15 01:40:00 -04:00
pigeon-rootfs,
pigeon-vcpu-count ? 1,
pigeon-memory-size-mb ? 512
2026-10-15 01:10:33 -04:00
}:
writeText "pigeon-vm.json" (builtins.toJSON {
boot-source = {
kernel_image_path = "${pigeon-kernel}";
boot_args = "reboot=k panic=1 quiet init=/init nomodule 8250.nr_uarts=0 i8042.noaux i8042.nomux i8042.dumbkbd swiotlb=noforce";
};
drives = [
{
drive_id = "rootfs";
path_on_host = "${pigeon-rootfs}";
is_root_device = true;
is_read_only = true;
}
{
drive_id = "student";
path_on_host = "";
is_root_device = false;
is_read_only = true;
}
{
drive_id = "grader";
path_on_host = "";
is_root_device = false;
is_read_only = true;
}
{
drive_id = "results";
path_on_host = "";
is_root_device = false;
is_read_only = false;
}
];
machine-config = {
vcpu_count = pigeon-vcpu-count;
2026-10-15 01:40:00 -04:00
mem_size_mib = pigeon-memory-size-mb;
2026-10-15 01:10:33 -04:00
};
})