nixos-config/machines/odin/storage.nix

95 lines
2 KiB
Nix
Raw Normal View History

2023-01-17 13:45:37 +01:00
{
disko.devices = {
disk = {
nvme0n1 = {
device = "/dev/nvme0n1";
2023-01-17 13:45:37 +01:00
type = "disk";
content = {
type = "gpt";
partitions = {
esp = {
name = "ESP";
size = "512M";
type = "EF00";
2023-01-17 13:45:37 +01:00
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%";
2023-01-17 13:45:37 +01:00
content = {
type = "lvm_pv";
vg = "data";
2023-01-17 13:45:37 +01:00
};
};
};
2023-01-17 13:45:37 +01:00
};
};
sdb = {
device = "/dev/sda";
2023-01-17 13:45:37 +01:00
type = "disk";
content = {
type = "gpt";
partitions = {
root = {
name = "data_pv_sdb";
size = "100%";
2023-01-17 13:45:37 +01:00
content = {
type = "lvm_pv";
vg = "data";
2023-01-17 13:45:37 +01:00
};
};
};
2023-01-17 13:45:37 +01:00
};
};
};
lvm_vg = {
root-pool = {
2023-01-17 13:45:37 +01:00
type = "lvm_vg";
lvs = {
nixos = {
size = "250G";
2023-01-17 13:45:37 +01:00
content = {
type = "filesystem";
format = "ext4";
mountpoint = "/";
mountOptions = [ "defaults" ];
};
};
swap = {
size = "8G";
2023-01-17 13:45:37 +01:00
content = {
type = "swap";
randomEncryption = true;
2023-01-17 13:45:37 +01:00
};
};
};
};
data = {
type = "lvm_vg";
lvs = {
data = {
2023-01-17 13:45:37 +01:00
size = "100%FREE";
extraArgs = [
"--type=thin-pool"
];
2023-01-17 13:45:37 +01:00
};
};
};
};
};
}