2024-06-28 20:21:27 +01:00
|
|
|
{
|
|
|
|
device ? throw "Must define a device, e.g. /dev/sda",
|
|
|
|
fsModule ? "Must specify submodule"
|
|
|
|
}:
|
2024-05-27 15:42:50 +01:00
|
|
|
{
|
|
|
|
disko.devices = {
|
|
|
|
disk.main = {
|
|
|
|
inherit device;
|
|
|
|
type = "disk";
|
|
|
|
content = {
|
|
|
|
type = "gpt";
|
|
|
|
partitions = {
|
|
|
|
ESP = {
|
|
|
|
priority = 1;
|
|
|
|
name = "ESP";
|
|
|
|
start = "1M";
|
|
|
|
end = "512M";
|
|
|
|
type = "EF00";
|
|
|
|
content = {
|
|
|
|
type = "filesystem";
|
|
|
|
format = "vfat";
|
|
|
|
mountpoint = "/boot";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
root = {
|
|
|
|
name = "root";
|
|
|
|
size = "100%";
|
|
|
|
content = {
|
|
|
|
type = "lvm_pv";
|
|
|
|
vg = "root_vg";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
lvm_vg = {
|
|
|
|
root_vg = {
|
|
|
|
type = "lvm_vg";
|
|
|
|
lvs = {
|
|
|
|
root = {
|
|
|
|
size = "100%FREE";
|
2024-06-28 20:21:27 +01:00
|
|
|
content = (import "${fsModule}");
|
2024-05-27 15:42:50 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|