38 lines
895 B
Nix
38 lines
895 B
Nix
{device ? throw "Must define a device, e.g. /dev/sda"}:
|
|
{
|
|
disko.devices = {
|
|
disk = {
|
|
vdb = {
|
|
type = "disk";
|
|
inherit device;
|
|
content = {
|
|
type = "gpt";
|
|
partitions = {
|
|
ESP = {
|
|
size = "512M";
|
|
type = "EF00";
|
|
content = {
|
|
type = "filesystem";
|
|
format = "vfat";
|
|
mountpoint = "/boot";
|
|
mountOptions = [
|
|
"defaults"
|
|
];
|
|
};
|
|
};
|
|
luks = {
|
|
size = "100%";
|
|
content = {
|
|
type = "luks";
|
|
name = "crypted";
|
|
passwordFile = "/tmp/luks_secret.key"; # Interactive
|
|
content = (import ./btrfs-persist.nix);
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
}
|