# Example to create a bios compatible gpt partition { lib, ... }: { # Disk /dev/sda: 200 GiB, 214748364800 bytes, 419430400 sectors # Disk model: QEMU HARDDISK # Units: sectors of 1 * 512 = 512 bytes # Sector size (logical/physical): 512 bytes / 512 bytes # I/O size (minimum/optimal): 512 bytes / 512 bytes # Disklabel type: gpt # Disk identifier: CED6435C-56EF-4699-BEE9-19280C444BCA # # Device Start End Sectors Size Type # /dev/sda1 2048 4095 2048 1M BIOS boot # /dev/sda2 4096 4194303 4190208 2G Linux filesystem # /dev/sda3 4194304 419428351 415234048 198G Linux filesystem # disko.devices = { disk.disk1 = { device = lib.mkDefault "/dev/sda"; type = "disk"; content = { type = "gpt"; partitions = { boot = { name = "boot"; size = "1M"; type = "EF02"; }; esp = { name = "ESP"; size = "500M"; type = "EF00"; content = { type = "filesystem"; format = "vfat"; mountpoint = "/boot"; }; }; root = { name = "root"; size = "100%"; # Allocates the remainder of the disk, minus the sizes of the other partitions content = { type = "filesystem"; format = "ext4"; mountpoint = "/"; }; }; }; }; }; }; }