2022-10-21 12:43:55 +00:00
|
|
|
{ disks ? [ "/dev/vdb" ], ... }: {
|
2023-03-03 07:09:13 +00:00
|
|
|
disko.devices = {
|
|
|
|
disk = {
|
|
|
|
vdb = {
|
|
|
|
type = "disk";
|
|
|
|
device = builtins.elemAt disks 0;
|
|
|
|
content = {
|
|
|
|
type = "table";
|
|
|
|
format = "gpt";
|
|
|
|
partitions = [
|
|
|
|
{
|
|
|
|
name = "ESP";
|
|
|
|
start = "1MiB";
|
|
|
|
end = "128MiB";
|
|
|
|
fs-type = "fat32";
|
|
|
|
bootable = true;
|
|
|
|
content = {
|
|
|
|
type = "filesystem";
|
|
|
|
format = "vfat";
|
|
|
|
mountpoint = "/boot";
|
|
|
|
};
|
|
|
|
}
|
|
|
|
{
|
|
|
|
name = "root";
|
|
|
|
start = "128MiB";
|
|
|
|
end = "100%";
|
|
|
|
content = {
|
|
|
|
type = "btrfs";
|
|
|
|
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-12-17 17:09:10 +00:00
|
|
|
};
|
|
|
|
};
|
2023-03-03 07:09:13 +00:00
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
2022-08-29 09:45:19 +00:00
|
|
|
};
|
2022-08-25 19:46:17 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|