summaryrefslogtreecommitdiffstats
path: root/example
diff options
context:
space:
mode:
authorlassulus <lassulus@lassul.us>2022-08-26 12:50:52 +0200
committerlassulus <lassulus@lassul.us>2022-08-26 12:55:50 +0200
commit9bb4aec9640cbc30e241c267158e506278862b5e (patch)
treec6057a3d362e06742073b35d4c11db7ee9a0a820 /example
parent722dde361ca51864fd9b3b6b9a78875e436fbc24 (diff)
support zfs over legacy fs
Diffstat (limited to 'example')
-rw-r--r--example/zfs-over-legacy.nix42
1 files changed, 42 insertions, 0 deletions
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";
+ }
+ ];
+ };
+ };
+}
+