mirror of
https://github.com/nix-community/disko.git
synced 2024-11-05 06:04:20 +03:00
76 lines
1.8 KiB
Nix
76 lines
1.8 KiB
Nix
{
|
|
disko.devices = {
|
|
disk = {
|
|
vdb = {
|
|
type = "disk";
|
|
device = "/dev/vdb";
|
|
content = {
|
|
type = "gpt";
|
|
partitions = {
|
|
ESP = {
|
|
size = "500M";
|
|
type = "EF00";
|
|
content = {
|
|
type = "filesystem";
|
|
format = "vfat";
|
|
mountpoint = "/boot";
|
|
mountOptions = [
|
|
"defaults"
|
|
];
|
|
};
|
|
};
|
|
luks = {
|
|
size = "100%";
|
|
content = {
|
|
type = "luks";
|
|
name = "crypted";
|
|
extraOpenArgs = [ ];
|
|
settings = {
|
|
# if you want to use the key for interactive login be sure there is no trailing newline
|
|
# for example use `echo -n "password" > /tmp/secret.key`
|
|
keyFile = "/tmp/secret.key";
|
|
allowDiscards = true;
|
|
};
|
|
additionalKeyFiles = [ "/tmp/additionalSecret.key" ];
|
|
content = {
|
|
type = "lvm_pv";
|
|
vg = "pool";
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
lvm_vg = {
|
|
pool = {
|
|
type = "lvm_vg";
|
|
lvs = {
|
|
root = {
|
|
size = "100M";
|
|
content = {
|
|
type = "filesystem";
|
|
format = "ext4";
|
|
mountpoint = "/";
|
|
mountOptions = [
|
|
"defaults"
|
|
];
|
|
};
|
|
};
|
|
home = {
|
|
size = "10M";
|
|
content = {
|
|
type = "filesystem";
|
|
format = "ext4";
|
|
mountpoint = "/home";
|
|
};
|
|
};
|
|
raw = {
|
|
size = "10M";
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
}
|