2023-10-16 18:30:32 +02:00
|
|
|
{ lib, ... }: {
|
2023-08-15 13:41:08 +02:00
|
|
|
disko.devices = {
|
|
|
|
disk = {
|
|
|
|
disk1 = {
|
|
|
|
type = "disk";
|
2023-10-16 18:30:32 +02:00
|
|
|
device = lib.mkDefault "/dev/nvme0n1";
|
2023-08-15 13:41:08 +02:00
|
|
|
content = {
|
|
|
|
type = "gpt";
|
|
|
|
partitions = {
|
|
|
|
ESP = {
|
|
|
|
size = "500M";
|
|
|
|
type = "EF00";
|
|
|
|
content = {
|
|
|
|
type = "filesystem";
|
|
|
|
format = "vfat";
|
|
|
|
mountpoint = "/boot";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
luks = {
|
|
|
|
size = "100%";
|
|
|
|
content = {
|
|
|
|
type = "luks";
|
|
|
|
name = "crypted";
|
|
|
|
extraOpenArgs = [ "--allow-discards" ];
|
2023-10-16 18:30:32 +02:00
|
|
|
# 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`
|
2023-08-15 13:41:08 +02:00
|
|
|
settings.keyFile = "/tmp/secret.key";
|
|
|
|
content = {
|
|
|
|
type = "lvm_pv";
|
|
|
|
vg = "pool";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
lvm_vg = {
|
|
|
|
pool = {
|
|
|
|
type = "lvm_vg";
|
|
|
|
lvs = {
|
|
|
|
root = {
|
|
|
|
size = "30G";
|
|
|
|
content = {
|
|
|
|
type = "filesystem";
|
|
|
|
format = "ext4";
|
|
|
|
mountpoint = "/";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
home = {
|
|
|
|
size = "30G";
|
|
|
|
content = {
|
|
|
|
type = "filesystem";
|
|
|
|
format = "ext4";
|
|
|
|
mountpoint = "/home";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|