snowfield/machines/gallifrey/disko.nix

90 lines
2.3 KiB
Nix

{
devices = {
disk = {
main = {
type = "disk";
device = "/dev/disk/by-id/nvme-CT2000P3PSSD8_2316E6CBA6BA";
content = {
type = "gpt";
partitions = {
boot = {
size = "1M";
type = "EF02";
};
ESP = {
size = "10G";
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
};
};
swap = {
size = "16G";
content = {
type = "swap";
discardPolicy = "both";
};
};
luks = {
size = "100%";
content = {
type = "luks";
name = "crypted";
extraOpenArgs = [ ];
passwordFile = "/tmp/secret.key";
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`
allowDiscards = true;
};
content = {
type = "lvm_pv";
vg = "mainpool";
};
};
};
};
};
};
};
lvm_vg = {
mainpool = {
type = "lvm_vg";
lvs = {
root = {
size = "300G";
pool = "mainpool";
content = {
type = "filesystem";
format = "ext4";
mountpoint = "/";
mountOptions = [ "defaults" ];
};
};
persistent = {
size = "600G";
pool = "mainpool";
content = {
type = "filesystem";
format = "ext4";
mountpoint = "/persistent";
mountOptions = [ "defaults" ];
};
};
store = {
size = "900G";
pool = "mainpool";
content = {
type = "filesystem";
format = "ext4";
mountpoint = "/nix";
};
};
};
};
};
};
}