mirror of
https://github.com/nix-community/disko.git
synced 2024-11-09 00:04:18 +03:00
53 lines
1.2 KiB
Nix
53 lines
1.2 KiB
Nix
{ disks ? [ "/dev/vdb" ], ... }: {
|
|
disko.devices = {
|
|
disk = {
|
|
vdb = {
|
|
device = builtins.elemAt disks 0;
|
|
type = "disk";
|
|
content = {
|
|
type = "table";
|
|
format = "gpt";
|
|
partitions = [
|
|
{
|
|
type = "partition";
|
|
name = "ESP";
|
|
start = "1MiB";
|
|
end = "100MiB";
|
|
bootable = true;
|
|
content = {
|
|
type = "filesystem";
|
|
format = "vfat";
|
|
mountpoint = "/boot";
|
|
};
|
|
}
|
|
{
|
|
name = "root";
|
|
type = "partition";
|
|
start = "100MiB";
|
|
end = "-1G";
|
|
part-type = "primary";
|
|
content = {
|
|
type = "filesystem";
|
|
format = "ext4";
|
|
mountpoint = "/";
|
|
};
|
|
}
|
|
{
|
|
name = "swap";
|
|
type = "partition";
|
|
start = "-1G";
|
|
end = "100%";
|
|
part-type = "primary";
|
|
content = {
|
|
type = "swap";
|
|
randomEncryption = true;
|
|
};
|
|
}
|
|
];
|
|
};
|
|
};
|
|
};
|
|
};
|
|
}
|
|
|