diff options
author | lassulus <lassulus@lassul.us> | 2022-08-29 11:45:19 +0200 |
---|---|---|
committer | lassulus <lassulus@lassul.us> | 2022-09-02 11:14:58 +0200 |
commit | dcb0c42857a2ada8754d4514d4b8c4c1d67ab3f5 (patch) | |
tree | d4c0f34db5bb060d9133fc03f57e68e46fdb86ff /example/zfs-over-legacy.nix | |
parent | adf901d58155ca268d15351fff164d3ef38a0890 (diff) |
reimplement disko using the nixos type system
This should make the code cleaner, more robust and errors should be
clearer. we also changed the configuration format a bit.
Diffstat (limited to 'example/zfs-over-legacy.nix')
-rw-r--r-- | example/zfs-over-legacy.nix | 63 |
1 files changed, 34 insertions, 29 deletions
diff --git a/example/zfs-over-legacy.nix b/example/zfs-over-legacy.nix index 8f5a8bc..81a5975 100644 --- a/example/zfs-over-legacy.nix +++ b/example/zfs-over-legacy.nix @@ -1,41 +1,46 @@ { - type = "devices"; - content = { + disk = { 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 = "/"; - }; - } - ]; + type = "disk"; + device = "/dev/vdb"; + content = { + type = "table"; + format = "gpt"; + partitions = [ + { + type = "partition"; + start = "0%"; + end = "100%"; + name = "primary"; + bootable = true; + content = { + type = "filesystem"; + format = "ext4"; + mountpoint = "/"; + }; + } + ]; + }; }; vdc = { - type = "zfs"; - pool = "zroot"; + type = "disk"; + device = "/dev/vdc"; + content = { + type = "zfs"; + pool = "zroot"; + }; }; + }; + zpool = { zroot = { type = "zpool"; - mountpoint = "/"; - - datasets = [ - { - type = "zfs_filesystem"; - name = "zfs_fs"; + datasets = { + zfs_fs = { + zfs_type = "filesystem"; mountpoint = "/zfs_fs"; options."com.sun:auto-snapshot" = "true"; - } - ]; + }; + }; }; }; } |