disko/example/config.nix

68 lines
1.7 KiB
Nix
Raw Normal View History

# usage: nix-instantiate --eval --json --strict example/config.nix | jq .
2018-07-13 11:16:12 +02:00
{
2018-07-25 01:25:04 +02:00
type = "devices";
2018-07-19 21:52:11 +02:00
content = {
2018-07-25 01:25:04 +02:00
sda = {
2018-07-19 21:52:11 +02:00
type = "table";
format = "gpt";
partitions = [
{
type = "partition";
part-type = "ESP";
start = "1MiB";
end = "1024MiB";
fs-type = "fat32";
bootable = true;
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
};
}
{
type = "partition";
part-type = "primary";
start = "1024MiB";
end = "100%";
2022-08-17 17:52:12 +02:00
flags = [ "bios_grub" ];
2018-07-19 21:52:11 +02:00
content = {
type = "luks";
algo = "aes-xts...";
name = "crypted";
keyfile = "/tmp/secret.key";
2018-07-25 01:26:25 +02:00
extraArgs = [
"--hash sha512"
"--iter-time 5000"
];
2018-07-19 21:52:11 +02:00
content = {
type = "lvm";
name = "pool";
lvs = {
root = {
type = "lv";
size = "10G";
mountpoint = "/";
content = {
type = "filesystem";
format = "ext4";
mountpoint = "/";
};
};
home = {
type = "lv";
size = "10G";
content = {
type = "filesystem";
format = "ext4";
mountpoint = "/home";
};
};
2018-07-13 11:16:12 +02:00
};
};
};
2018-07-19 21:52:11 +02:00
}
];
};
};
2018-07-13 11:16:12 +02:00
}