2022-10-21 12:43:55 +00:00
|
|
|
# Example to create a bios compatible gpt partition
|
|
|
|
{ disks ? [ "/dev/vdb" ], lib, ... }: {
|
2023-03-03 07:09:13 +00:00
|
|
|
disko.devices = {
|
2023-07-15 18:42:37 +00:00
|
|
|
disk = lib.genAttrs disks (device: {
|
|
|
|
name = lib.replaceStrings [ "/" ] [ "_" ] device;
|
2023-03-03 07:09:13 +00:00
|
|
|
device = device;
|
|
|
|
type = "disk";
|
|
|
|
content = {
|
2023-07-15 18:42:37 +00:00
|
|
|
type = "gpt";
|
|
|
|
partitions = {
|
|
|
|
boot = {
|
|
|
|
size = "1M";
|
|
|
|
type = "EF02";
|
|
|
|
};
|
|
|
|
root = {
|
|
|
|
size = "100%";
|
2023-03-03 07:09:13 +00:00
|
|
|
content = {
|
|
|
|
type = "filesystem";
|
|
|
|
format = "ext4";
|
|
|
|
mountpoint = "/";
|
|
|
|
};
|
2023-07-15 18:42:37 +00:00
|
|
|
};
|
|
|
|
};
|
2023-03-03 07:09:13 +00:00
|
|
|
};
|
|
|
|
});
|
|
|
|
};
|
2022-10-21 12:43:55 +00:00
|
|
|
}
|