nixos-config/machines/odin/storage.nix

105 lines
2.2 KiB
Nix
Raw Normal View History

2023-01-17 13:45:37 +01:00
{ disko, ... }:
{
disko.devices = {
disk = {
sda = {
device = "/dev/vda";
type = "disk";
content = {
type = "table";
format = "gpt";
partitions = [
{
type = "partition";
name = "boot";
start = "1MiB";
end = "512MiB";
bootable = true;
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
};
}
{
type = "partition";
name = "root_pv_sda";
start = "512MiB";
end = "100%";
content = {
type = "lvm_pv";
vg = "pool";
};
}
];
};
};
sdb = {
2023-01-17 14:06:47 +01:00
device = "/dev/vdb";
2023-01-17 13:45:37 +01:00
type = "disk";
content = {
type = "table";
format = "gpt";
partitions = [
{
type = "partition";
name = "root_pv_sdb";
start = "0%";
end = "100%";
content = {
type = "lvm_pv";
vg = "pool";
};
}
];
};
};
};
lvm_vg = {
pool = {
type = "lvm_vg";
lvs = {
root = {
size = "32GiB";
content = {
type = "filesystem";
format = "ext4";
mountpoint = "/";
mountOptions = [ "defaults" ];
};
};
swap = {
size = "8GiB";
content = {
type = "swap";
randomEncryption = false;
};
};
data = {
size = "100%FREE";
content = {
type = "filesystem";
format = "ext4";
mountpoint = "/data";
mountOptions = [ "defaults" ];
};
};
};
};
};
};
# fileSystems."/" = {
# device = "/dev/disk/by-label/nixos";
# fsType = "ext4";
# };
# fileSystems."/data" = {
# device = "/dev/disk/by-label/data";
# fsType = "btrfs";
# };
}