mirror of
https://github.com/nix-community/disko.git
synced 2024-09-10 22:15:54 +03:00
29 lines
687 B
Nix
29 lines
687 B
Nix
# Example to create a bios compatible gpt partition
|
|
{ disks ? [ "/dev/vdb" ], lib, ... }: {
|
|
disko.devices = {
|
|
disk = lib.genAttrs disks (device: {
|
|
name = lib.replaceStrings [ "/" ] [ "_" ] device;
|
|
device = device;
|
|
type = "disk";
|
|
content = {
|
|
type = "gpt";
|
|
partitions = {
|
|
boot = {
|
|
size = "1M";
|
|
type = "EF02";
|
|
priority = 1; # Needs to be first partition
|
|
};
|
|
root = {
|
|
size = "100%";
|
|
content = {
|
|
type = "filesystem";
|
|
format = "ext4";
|
|
mountpoint = "/";
|
|
};
|
|
};
|
|
};
|
|
};
|
|
});
|
|
};
|
|
}
|