2022-09-30 13:55:28 +03:00
|
|
|
{ disks ? [ "/dev/vdb" "/dev/vdc" ] }: {
|
2022-08-29 12:45:19 +03:00
|
|
|
disk = {
|
2022-08-26 13:50:52 +03:00
|
|
|
vdb = {
|
2022-08-29 12:45:19 +03:00
|
|
|
type = "disk";
|
2022-09-30 13:55:28 +03:00
|
|
|
device = builtins.elemAt disks 0;
|
2022-08-29 12:45:19 +03:00
|
|
|
content = {
|
|
|
|
type = "table";
|
|
|
|
format = "gpt";
|
|
|
|
partitions = [
|
|
|
|
{
|
|
|
|
type = "partition";
|
2022-09-30 13:55:28 +03:00
|
|
|
name = "ESP";
|
|
|
|
start = "1MiB";
|
|
|
|
end = "100MiB";
|
|
|
|
bootable = true;
|
|
|
|
content = {
|
|
|
|
type = "filesystem";
|
|
|
|
format = "vfat";
|
|
|
|
mountpoint = "/boot";
|
|
|
|
options = [
|
|
|
|
"defaults"
|
|
|
|
];
|
|
|
|
};
|
|
|
|
}
|
|
|
|
{
|
|
|
|
type = "partition";
|
|
|
|
start = "100MiB";
|
2022-08-29 12:45:19 +03:00
|
|
|
end = "100%";
|
|
|
|
name = "primary";
|
|
|
|
bootable = true;
|
|
|
|
content = {
|
|
|
|
type = "filesystem";
|
|
|
|
format = "ext4";
|
|
|
|
mountpoint = "/";
|
|
|
|
};
|
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
2022-08-26 13:50:52 +03:00
|
|
|
};
|
|
|
|
vdc = {
|
2022-08-29 12:45:19 +03:00
|
|
|
type = "disk";
|
2022-09-30 13:55:28 +03:00
|
|
|
device = builtins.elemAt disks 1;
|
2022-08-29 12:45:19 +03:00
|
|
|
content = {
|
|
|
|
type = "zfs";
|
|
|
|
pool = "zroot";
|
|
|
|
};
|
2022-08-26 13:50:52 +03:00
|
|
|
};
|
2022-08-29 12:45:19 +03:00
|
|
|
};
|
|
|
|
zpool = {
|
2022-08-26 13:50:52 +03:00
|
|
|
zroot = {
|
|
|
|
type = "zpool";
|
2022-09-30 13:55:28 +03:00
|
|
|
rootFsOptions.mountpoint = "none";
|
2022-08-29 12:45:19 +03:00
|
|
|
datasets = {
|
2022-09-30 13:55:28 +03:00
|
|
|
"root" = {
|
|
|
|
zfs_type = "filesystem";
|
|
|
|
options.mountpoint = "none";
|
|
|
|
};
|
|
|
|
"root/zfs_fs" = {
|
2022-08-29 12:45:19 +03:00
|
|
|
zfs_type = "filesystem";
|
2022-08-26 13:50:52 +03:00
|
|
|
mountpoint = "/zfs_fs";
|
2022-09-30 13:55:28 +03:00
|
|
|
options.mountpoint = "/zfs_fs";
|
2022-08-26 13:50:52 +03:00
|
|
|
options."com.sun:auto-snapshot" = "true";
|
2022-08-29 12:45:19 +03:00
|
|
|
};
|
|
|
|
};
|
2022-08-26 13:50:52 +03:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|