nixos/disko/palantir/lvm.nix

92 lines
2.7 KiB
Nix

{...}:
let
disks = [
"/dev/disk/by-id/ata-KINGSTON_SA400S37960G_50026B7383515406"
#"/dev/disk/by-id/ata-KINGSTON_SA400S37120G_50026B7783176055"
];
in
{
disko.devices = {
disk = {
ssd0 = {
type = "disk";
device = builtins.elemAt disks 0;
content = {
type = "gpt";
partitions = {
esp = {
size = "512M";
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot/efi";
mountOptions = [ "umask=0077" ];
};
};
lvm = {
size = "100%";
content = {
type = "lvm_pv";
vg = "mainpool";
};
};
};
};
};
#ssd1 = {
# type = "disk";
# device = builtins.elemAt disks 1;
# content = {
# type = "gpt";
# partitions = {
# lvm = {
# size = "100%";
# content = {
# type = "lvm_pv";
# vg = "mainpool";
# };
# };
# };
# };
#};
};
lvm_vg = {
mainpool = {
type = "lvm_vg";
lvs = {
root = {
size = "30G";
content = {
type = "filesystem";
format = "ext4";
mountpoint = "/";
};
};
nix = {
size = "100G";
content = {
type = "filesystem";
format = "ext4";
mountpoint = "/nix";
};
};
games = {
size = "200G";
content = {
type = "filesystem";
format = "ext4";
mountpoint = "/games";
};
};
};
};
};
};
}