disko/example/swap.nix

50 lines
1.1 KiB
Nix
Raw Normal View History

2022-11-05 23:17:35 +03:00
{ disks ? [ "/dev/vdb" ], ... }: {
disko.devices = {
disk = {
vdb = {
device = builtins.elemAt disks 0;
type = "disk";
content = {
type = "table";
format = "gpt";
partitions = [
{
name = "ESP";
start = "1MiB";
end = "100MiB";
bootable = true;
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
};
}
{
name = "root";
start = "100MiB";
end = "-1G";
part-type = "primary";
content = {
type = "filesystem";
format = "ext4";
mountpoint = "/";
};
}
{
name = "swap";
start = "-1G";
end = "100%";
part-type = "primary";
content = {
type = "swap";
randomEncryption = true;
};
}
];
};
2022-11-05 23:17:35 +03:00
};
};
};
}