66 lines
1.4 KiB
Nix
66 lines
1.4 KiB
Nix
{
|
|
device ? throw "select device"
|
|
, ...
|
|
}:
|
|
{
|
|
disko.devices = {
|
|
disk = {
|
|
main = {
|
|
inherit device;
|
|
type = "disk";
|
|
content = {
|
|
type = "gpt";
|
|
partitions = {
|
|
boot = {
|
|
name = "boot";
|
|
size = "1M";
|
|
type = "EF02";
|
|
};
|
|
ESP = {
|
|
priority = 1;
|
|
size = "1G";
|
|
type = "EF00";
|
|
content = {
|
|
type = "filesystem";
|
|
format = "vfat";
|
|
mountpoint = "/boot";
|
|
mountOptions = [
|
|
"defaults"
|
|
"umask=0077"
|
|
];
|
|
extraArgs = [
|
|
"-n"
|
|
"BOOT"
|
|
];
|
|
};
|
|
};
|
|
swap = {
|
|
size = "108G";
|
|
content = {
|
|
type = "swap";
|
|
discardPolicy = "both";
|
|
resumeDevice = true;
|
|
extraArgs = [
|
|
"--label"
|
|
"SWAP"
|
|
];
|
|
};
|
|
};
|
|
root = {
|
|
size = "100%";
|
|
content = {
|
|
type = "filesystem";
|
|
format = "ext4";
|
|
mountpoint = "/";
|
|
extraArgs = [
|
|
"-L"
|
|
"ROOT"
|
|
];
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
}
|