nixos-config/machines/odin/storage.nix

94 lines
2 KiB
Nix

{
disko.devices = {
disk = {
nvme0n1 = {
device = "/dev/nvme0n1";
type = "disk";
content = {
type = "gpt";
partitions = {
esp = {
name = "ESP";
size = "512M";
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
};
};
root = {
name = "root_pv_nvme0n1";
size = "260G";
content = {
type = "lvm_pv";
vg = "root-pool";
};
};
data = {
name = "data_pv_nvme0n1";
size = "100%";
content = {
type = "lvm_pv";
vg = "data";
};
};
};
};
};
sdb = {
device = "/dev/sda";
type = "disk";
content = {
type = "gpt";
partitions = {
root = {
name = "data_pv_sdb";
size = "100%";
content = {
type = "lvm_pv";
vg = "data";
};
};
};
};
};
};
lvm_vg = {
root-pool = {
type = "lvm_vg";
lvs = {
nixos = {
size = "250G";
content = {
type = "filesystem";
format = "ext4";
mountpoint = "/";
mountOptions = [ "defaults" ];
};
};
swap = {
size = "8G";
content = {
type = "swap";
randomEncryption = true;
};
};
};
};
data = {
type = "lvm_vg";
lvs = {
data = {
size = "100%FREE";
extraArgs = [
"--type=thin-pool"
];
};
};
};
};
};
}