disko/example/zfs.nix

59 lines
1.2 KiB
Nix
Raw Normal View History

2022-08-25 13:08:26 +00:00
{
disk = {
2022-08-25 13:08:26 +00:00
vdb = {
type = "disk";
device = "/dev/vdb";
content = {
type = "zfs";
pool = "zroot";
};
2022-08-25 13:08:26 +00:00
};
vdc = {
type = "disk";
device = "/dev/vdc";
content = {
type = "zfs";
pool = "zroot";
};
2022-08-25 13:08:26 +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";
};
mountpoint = "/";
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";
};
zfs_unmounted_fs = {
zfs_type = "filesystem";
options.mountpoint = "none";
};
zfs_legacy_fs = {
zfs_type = "filesystem";
2022-08-25 13:08:26 +00:00
options.mountpoint = "legacy";
mountpoint = "/zfs_legacy_fs";
};
zfs_testvolume = {
zfs_type = "volume";
2022-08-25 13:08:26 +00:00
size = "10M";
content = {
type = "filesystem";
format = "ext4";
mountpoint = "/ext4onzfs";
};
};
};
2022-08-25 13:08:26 +00:00
};
};
}