2022-09-04 10:10:09 +00:00
|
|
|
# Example to create a bios compatible gpt partition
|
2022-10-21 12:43:55 +00:00
|
|
|
{ disks ? [ "/dev/vdb" ], ... }: {
|
2023-03-03 07:09:13 +00:00
|
|
|
disko.devices = {
|
|
|
|
disk = {
|
|
|
|
vdb = {
|
|
|
|
device = builtins.elemAt disks 0;
|
|
|
|
type = "disk";
|
|
|
|
content = {
|
|
|
|
type = "table";
|
|
|
|
format = "gpt";
|
|
|
|
partitions = [
|
|
|
|
{
|
|
|
|
name = "boot";
|
|
|
|
start = "0";
|
|
|
|
end = "1M";
|
|
|
|
part-type = "primary";
|
|
|
|
flags = [ "bios_grub" ];
|
|
|
|
}
|
|
|
|
{
|
|
|
|
name = "root";
|
|
|
|
# leave space for the grub aka BIOS boot
|
|
|
|
start = "1M";
|
|
|
|
end = "100%";
|
|
|
|
part-type = "primary";
|
|
|
|
bootable = true;
|
|
|
|
content = {
|
|
|
|
type = "filesystem";
|
|
|
|
format = "ext4";
|
|
|
|
mountpoint = "/";
|
|
|
|
};
|
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
2022-09-04 10:10:09 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|