infra/nixos/hosts/silver/disk-config.nix

95 lines
2.0 KiB
Nix

{
disko.devices = {
disk = {
main = {
type = "disk";
device = "/dev/vda";
content = {
type = "gpt";
partitions = {
bios = {
name = "bios";
size = "1M";
type = "EF02";
};
boot = {
name = "boot";
type = "8300";
size = "1G";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
mountOptions = ["defaults"];
};
};
luks = {
size = "100%";
content = {
type = "luks";
name = "encrypted";
extraOpenArgs = [];
settings = {
allowDiscards = true;
bypassWorkqueues = true;
};
passwordFile = "/tmp/luks-pw";
content = {
type = "lvm_pv";
vg = "pool";
};
};
};
};
};
};
};
nodev = {
"/" = {
fsType = "tmpfs";
mountOptions = [
"defaults"
"size=6G"
"mode=755"
];
};
};
lvm_vg = {
pool = {
type = "lvm_vg";
lvs = {
nix = {
size = "24G";
content = {
type = "filesystem";
format = "ext4";
mountpoint = "/nix";
mountOptions = [
"defaults"
"noatime"
];
};
};
persist = {
size = "100%FREE";
content = {
type = "filesystem";
format = "ext4";
mountpoint = "/persist";
mountOptions = [
"defaults"
"noatime"
];
};
};
};
};
};
};
}