palette/nixos/disko.nix
George Kaklamanos e3153ed581
disko: Create build and games logical volumes
Signed-off-by: George Kaklamanos <gkaklas@gkaklas.gr>
2024-08-03 16:35:57 +03:00

75 lines
1.7 KiB
Nix

{
disko.devices.disk.ssd.type = "disk";
disko.devices.disk.ssd.device = "/dev/nvme0n1";
disko.devices.disk.ssd.content.type = "gpt";
disko.devices.disk.ssd.content.partitions.ESP = {
# For storing live images in the future,
# instead of creating a bootable USB drive
size = "10G";
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
mountOptions = [
"defaults"
];
};
};
disko.devices.disk.ssd.content.partitions.luks = {
size = "100%";
content = {
type = "luks";
name = "cryptroot";
content = {
type = "lvm_pv";
vg = "VolGroup0";
};
};
};
disko.devices.lvm_vg.VolGroup0.type = "lvm_vg";
disko.devices.lvm_vg.VolGroup0.lvs.root = {
size = "50G";
content = {
type = "filesystem";
format = "btrfs";
mountpoint = "/";
};
};
disko.devices.lvm_vg.VolGroup0.lvs.home = {
size = "100G";
content = {
type = "btrfs";
subvolumes = {
"gkaklas/.local/share/flatpak" = {
mountpoint = "/home/gkaklas/.local/share/flatpak";
};
};
mountpoint = "/home";
};
};
disko.devices.lvm_vg.VolGroup0.lvs.storage = {
size = "200G";
content = {
type = "filesystem";
format = "btrfs";
mountpoint = "/mnt/storage";
};
};
disko.devices.lvm_vg.VolGroup0.lvs.build = {
size = "20G";
content = {
type = "filesystem";
format = "btrfs";
mountpoint = "/mnt/build";
};
};
disko.devices.lvm_vg.VolGroup0.lvs.games = {
size = "20G";
content = {
type = "filesystem";
format = "btrfs";
mountpoint = "/mnt/games";
};
};
}