37 lines
793 B
Nix
37 lines
793 B
Nix
{
|
|
device ? throw "Must define a device, e.g. /dev/sda",
|
|
fsModule ? "Must specify submodule"
|
|
}:
|
|
{
|
|
disko.devices = {
|
|
disk = {
|
|
main = {
|
|
type = "disk";
|
|
inherit device;
|
|
content = {
|
|
type = "gpt";
|
|
partitions = {
|
|
ESP = {
|
|
priority = 1;
|
|
name = "ESP";
|
|
start = "1M";
|
|
end = "128M";
|
|
type = "EF00";
|
|
content = {
|
|
type = "filesystem";
|
|
format = "vfat";
|
|
mountpoint = "/boot";
|
|
mountOptions = ["umask=0077"];
|
|
};
|
|
};
|
|
root = {
|
|
size = "100%";
|
|
content = import "${fsModule}";
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
}
|