Major rework in progress

This commit is contained in:
2024-10-10 11:01:59 -05:00
parent 35d920744f
commit f11a6ab86e
26 changed files with 742 additions and 253 deletions

View File

@@ -0,0 +1,43 @@
{ devices ? throw "Set this to an attribute set of your devices e.g. { disk1 = \"/dev/sda\"; }", ... }: {
disko.devices = builtins.mapAttrs (name: device: {
disk.${name} = {
inherit device;
type = "disk";
content = {
type = "gpt";
partitions = {
${name} = {
name = "${name}";
size = "100%";
content = {
type = "lvm_pv";
vg = "$name_vg";
};
};
};
};
};
lvm_vg = {
"${name}_vg" = {
type = "lvm_vg";
lvs = {
${name} = {
size = "100%FREE";
content = {
type = "btrfs";
extraArgs = [ "-f" ];
subvolumes = {
"/${name}" = {
mountOptions = [ "subvol=${name}" "noatime" ];
mountpoint = "/${name}";
};
};
};
};
};
};
};
}) devices;
}