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

95 lines
2.0 KiB
Nix
Raw Normal View History

2024-10-13 15:16:39 -05:00
{
disko.devices = {
disk = {
main = {
type = "disk";
device = "/dev/nvme0n1";
content = {
type = "gpt";
partitions = {
boot = {
name = "boot";
size = "1M";
type = "EF02";
};
esp = {
name = "ESP";
type = "EF00";
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=8G"
"mode=755"
];
};
};
lvm_vg = {
pool = {
type = "lvm_vg";
lvs = {
nix = {
size = "64G";
content = {
type = "filesystem";
format = "ext4";
mountpoint = "/nix";
mountOptions = [
"defaults"
"noatime"
];
};
};
persist = {
size = "100%FREE";
content = {
type = "filesystem";
format = "ext4";
mountpoint = "/persist";
mountOptions = [
"defaults"
"noatime"
];
};
};
};
};
};
};
}