mirror of
https://github.com/nix-community/disko.git
synced 2024-11-12 18:15:46 +03:00
ff5127ea0a
Originally this was manually applied with; ```sh nixpkgs-fmt **.nix && statix fix ``` but I overlooked the fact that `**.nix` would only expand to files in the root (I should have used `**/*.nix`). Previous commit adds `nix fmt` support which passes `.` to `nixpkgs-fmt` (if no other path is explicitly specified when running `nix fmt`). This commit includes the changes made by running `nix fmt`.
70 lines
1.5 KiB
Nix
70 lines
1.5 KiB
Nix
# usage: nix-instantiate --eval --json --strict example/config.nix | jq .
|
|
{
|
|
lvm_vg = {
|
|
pool = {
|
|
type = "lvm_vg";
|
|
lvs = {
|
|
root = {
|
|
type = "lvm_lv";
|
|
size = "10G";
|
|
content = {
|
|
type = "filesystem";
|
|
format = "ext4";
|
|
mountpoint = "/";
|
|
};
|
|
};
|
|
home = {
|
|
type = "lvm_lv";
|
|
size = "10G";
|
|
content = {
|
|
type = "filesystem";
|
|
format = "ext4";
|
|
mountpoint = "/home";
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
disk = {
|
|
sda = {
|
|
device = "/dev/sda";
|
|
content = {
|
|
type = "table";
|
|
format = "gpt";
|
|
partitions = [
|
|
{
|
|
name = "ESP";
|
|
type = "partition";
|
|
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" ];
|
|
content = {
|
|
type = "luks";
|
|
name = "crypted";
|
|
keyFile = "/tmp/secret.key";
|
|
content = {
|
|
type = "lvm_pv";
|
|
vg = "pool";
|
|
};
|
|
};
|
|
}
|
|
];
|
|
};
|
|
};
|
|
};
|
|
}
|