2022-10-21 14:43:55 +02:00
|
|
|
{ disks ? [ "/dev/vdb" ], ... }: {
|
2022-08-29 11:45:19 +02:00
|
|
|
disk = {
|
2022-08-25 21:46:17 +02:00
|
|
|
vdb = {
|
2022-08-29 11:45:19 +02:00
|
|
|
type = "disk";
|
2022-09-30 12:55:28 +02:00
|
|
|
device = builtins.elemAt disks 0;
|
2022-08-29 11:45:19 +02:00
|
|
|
content = {
|
|
|
|
|
type = "table";
|
|
|
|
|
format = "gpt";
|
|
|
|
|
partitions = [
|
2022-09-30 12:55:28 +02:00
|
|
|
{
|
|
|
|
|
type = "partition";
|
|
|
|
|
name = "ESP";
|
|
|
|
|
start = "1MiB";
|
|
|
|
|
end = "128MiB";
|
|
|
|
|
fs-type = "fat32";
|
|
|
|
|
bootable = true;
|
|
|
|
|
content = {
|
|
|
|
|
type = "filesystem";
|
|
|
|
|
format = "vfat";
|
|
|
|
|
mountpoint = "/boot";
|
|
|
|
|
};
|
|
|
|
|
}
|
2022-08-29 11:45:19 +02:00
|
|
|
{
|
|
|
|
|
name = "root";
|
|
|
|
|
type = "partition";
|
2022-09-30 12:55:28 +02:00
|
|
|
start = "128MiB";
|
2022-08-29 11:45:19 +02:00
|
|
|
end = "100%";
|
|
|
|
|
content = {
|
|
|
|
|
type = "btrfs";
|
2022-12-17 12:09:10 -05:00
|
|
|
extraArgs = "-f"; # Override existing partition
|
|
|
|
|
subvolumes = {
|
|
|
|
|
# Subvolume name is different from mountpoint
|
|
|
|
|
"/rootfs" = {
|
|
|
|
|
mountpoint = "/";
|
|
|
|
|
};
|
|
|
|
|
# Mountpoints inferred from subvolume name
|
|
|
|
|
"/home" = {
|
|
|
|
|
mountOptions = ["compress=zstd"];
|
|
|
|
|
};
|
|
|
|
|
"/nix" = {
|
|
|
|
|
mountOptions = ["compress=zstd" "noatime"];
|
|
|
|
|
};
|
|
|
|
|
"/test" = {};
|
|
|
|
|
};
|
2022-08-29 11:45:19 +02:00
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
];
|
|
|
|
|
};
|
2022-08-25 21:46:17 +02:00
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|