From 9bb4aec9640cbc30e241c267158e506278862b5e Mon Sep 17 00:00:00 2001 From: lassulus Date: Fri, 26 Aug 2022 12:50:52 +0200 Subject: support zfs over legacy fs --- example/zfs-over-legacy.nix | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 example/zfs-over-legacy.nix (limited to 'example') diff --git a/example/zfs-over-legacy.nix b/example/zfs-over-legacy.nix new file mode 100644 index 0000000..8f5a8bc --- /dev/null +++ b/example/zfs-over-legacy.nix @@ -0,0 +1,42 @@ +{ + type = "devices"; + content = { + vdb = { + type = "table"; + format = "gpt"; + partitions = [ + { + type = "partition"; + # leave space for the grub aka BIOS boot + start = "0%"; + end = "100%"; + part-type = "primary"; + bootable = true; + content = { + type = "filesystem"; + format = "ext4"; + mountpoint = "/"; + }; + } + ]; + }; + vdc = { + type = "zfs"; + pool = "zroot"; + }; + zroot = { + type = "zpool"; + mountpoint = "/"; + + datasets = [ + { + type = "zfs_filesystem"; + name = "zfs_fs"; + mountpoint = "/zfs_fs"; + options."com.sun:auto-snapshot" = "true"; + } + ]; + }; + }; +} + -- cgit v1.2.3