summaryrefslogtreecommitdiffstats
path: root/example/zfs.nix
diff options
context:
space:
mode:
Diffstat (limited to 'example/zfs.nix')
-rw-r--r--example/zfs.nix53
1 files changed, 53 insertions, 0 deletions
diff --git a/example/zfs.nix b/example/zfs.nix
new file mode 100644
index 0000000..60e4700
--- /dev/null
+++ b/example/zfs.nix
@@ -0,0 +1,53 @@
+{
+ type = "devices";
+ content = {
+ vdb = {
+ type = "zfs";
+ pool = "zroot";
+ };
+ vdc = {
+ type = "zfs";
+ pool = "zroot";
+ };
+ zroot = {
+ type = "zpool";
+ mode = "mirror";
+ rootFsOptions = {
+ compression = "lz4";
+ "com.sun:auto-snapshot" = "false";
+ };
+ mountpoint = "/";
+
+ datasets = [
+ {
+ type = "zfs_filesystem";
+ name = "zfs_fs";
+ mountpoint = "/zfs_fs";
+ options."com.sun:auto-snapshot" = "true";
+ }
+ {
+ type = "zfs_filesystem";
+ name = "zfs_unmounted_fs";
+ options.mountpoint = "none";
+ }
+ {
+ type = "zfs_filesystem";
+ name = "zfs_legacy_fs";
+ options.mountpoint = "legacy";
+ mountpoint = "/zfs_legacy_fs";
+ }
+ {
+ type = "zfs_volume";
+ name = "zfs_testvolume";
+ size = "10M";
+ content = {
+ type = "filesystem";
+ format = "ext4";
+ mountpoint = "/ext4onzfs";
+ };
+ }
+ ];
+ };
+ };
+}
+