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