disko/example/config.nix

71 lines
1.5 KiB
Nix
Raw Permalink Normal View History

# usage: nix-instantiate --eval --json --strict example/config.nix | jq .
2018-07-13 09:16:12 +00:00
{
2022-09-04 10:44:38 +00:00
lvm_vg = {
pool = {
type = "lvm_vg";
lvs = {
root = {
type = "lv";
size = "10G";
2018-07-19 19:52:11 +00:00
content = {
type = "filesystem";
2022-09-04 10:44:38 +00:00
format = "ext4";
mountpoint = "/";
2018-07-19 19:52:11 +00:00
};
2022-09-04 10:44:38 +00:00
};
home = {
type = "lv";
size = "10G";
2018-07-19 19:52:11 +00:00
content = {
2022-09-04 10:44:38 +00:00
type = "filesystem";
format = "ext4";
mountpoint = "/home";
};
};
};
};
};
disk = {
sda = {
device = "/dev/sda";
content = {
type = "table";
format = "gpt";
partitions = [
{
name = "boot";
type = "partition";
part-type = "ESP";
start = "1MiB";
end = "1024MiB";
fs-type = "fat32";
bootable = true;
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
};
}
{
name = "crypt_root";
type = "partition";
part-type = "primary";
start = "1024MiB";
end = "100%";
flags = ["bios_grub"];
2018-07-19 19:52:11 +00:00
content = {
2022-09-04 10:44:38 +00:00
type = "luks";
name = "crypted";
keyFile = "/tmp/secret.key";
content = {
type = "lvm_pv";
vg = "pool";
2018-07-13 09:16:12 +00:00
};
};
2022-09-04 10:44:38 +00:00
}
];
};
2018-07-19 19:52:11 +00:00
};
};
2018-07-13 09:16:12 +00:00
}