2022-09-30 10:55:28 +00:00
|
|
|
{ disks ? [ "/dev/vdb" "/dev/vdc" ] }: {
|
2022-08-29 09:45:19 +00:00
|
|
|
disk = {
|
2022-09-30 10:55:28 +00:00
|
|
|
x = {
|
2022-08-29 09:45:19 +00:00
|
|
|
type = "disk";
|
2022-09-30 10:55:28 +00:00
|
|
|
device = builtins.elemAt disks 0;
|
2022-08-29 09:45:19 +00:00
|
|
|
content = {
|
2022-09-30 10:55:28 +00:00
|
|
|
type = "table";
|
|
|
|
format = "gpt";
|
|
|
|
partitions = [
|
|
|
|
{
|
|
|
|
type = "partition";
|
|
|
|
name = "ESP";
|
|
|
|
start = "0";
|
|
|
|
end = "64MiB";
|
|
|
|
fs-type = "fat32";
|
|
|
|
bootable = true;
|
|
|
|
content = {
|
|
|
|
type = "filesystem";
|
|
|
|
format = "vfat";
|
|
|
|
mountpoint = "/boot";
|
|
|
|
};
|
|
|
|
}
|
|
|
|
{
|
|
|
|
type = "partition";
|
|
|
|
name = "zfs";
|
|
|
|
start = "128MiB";
|
|
|
|
end = "100%";
|
|
|
|
content = {
|
|
|
|
type = "zfs";
|
|
|
|
pool = "zroot";
|
|
|
|
};
|
|
|
|
}
|
|
|
|
];
|
2022-08-29 09:45:19 +00:00
|
|
|
};
|
2022-08-25 13:08:26 +00:00
|
|
|
};
|
2022-09-30 10:55:28 +00:00
|
|
|
y = {
|
2022-08-29 09:45:19 +00:00
|
|
|
type = "disk";
|
2022-09-30 10:55:28 +00:00
|
|
|
device = builtins.elemAt disks 1;
|
2022-08-29 09:45:19 +00:00
|
|
|
content = {
|
2022-09-30 10:55:28 +00:00
|
|
|
type = "table";
|
|
|
|
format = "gpt";
|
|
|
|
partitions = [
|
|
|
|
{
|
|
|
|
type = "partition";
|
|
|
|
name = "zfs";
|
|
|
|
start = "128MiB";
|
|
|
|
end = "100%";
|
|
|
|
content = {
|
|
|
|
type = "zfs";
|
|
|
|
pool = "zroot";
|
|
|
|
};
|
|
|
|
}
|
|
|
|
];
|
2022-08-29 09:45:19 +00:00
|
|
|
};
|
2022-08-25 13:08:26 +00:00
|
|
|
};
|
2022-08-29 09:45:19 +00:00
|
|
|
};
|
|
|
|
zpool = {
|
2022-08-25 13:08:26 +00:00
|
|
|
zroot = {
|
|
|
|
type = "zpool";
|
|
|
|
mode = "mirror";
|
2022-08-26 07:07:24 +00:00
|
|
|
rootFsOptions = {
|
|
|
|
compression = "lz4";
|
|
|
|
"com.sun:auto-snapshot" = "false";
|
|
|
|
};
|
2022-08-26 08:28:07 +00:00
|
|
|
mountpoint = "/";
|
|
|
|
|
2022-08-29 09:45:19 +00:00
|
|
|
datasets = {
|
|
|
|
zfs_fs = {
|
|
|
|
zfs_type = "filesystem";
|
2022-08-25 13:08:26 +00:00
|
|
|
mountpoint = "/zfs_fs";
|
2022-08-26 07:07:24 +00:00
|
|
|
options."com.sun:auto-snapshot" = "true";
|
2022-08-29 09:45:19 +00:00
|
|
|
};
|
|
|
|
zfs_unmounted_fs = {
|
|
|
|
zfs_type = "filesystem";
|
2022-08-26 08:28:07 +00:00
|
|
|
options.mountpoint = "none";
|
2022-08-29 09:45:19 +00:00
|
|
|
};
|
|
|
|
zfs_legacy_fs = {
|
|
|
|
zfs_type = "filesystem";
|
2022-08-25 13:08:26 +00:00
|
|
|
options.mountpoint = "legacy";
|
|
|
|
mountpoint = "/zfs_legacy_fs";
|
2022-08-29 09:45:19 +00:00
|
|
|
};
|
|
|
|
zfs_testvolume = {
|
|
|
|
zfs_type = "volume";
|
2022-08-25 13:08:26 +00:00
|
|
|
size = "10M";
|
|
|
|
content = {
|
|
|
|
type = "filesystem";
|
|
|
|
format = "ext4";
|
|
|
|
mountpoint = "/ext4onzfs";
|
|
|
|
};
|
2022-08-29 09:45:19 +00:00
|
|
|
};
|
|
|
|
};
|
2022-08-25 13:08:26 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|