diff options
author | lassulus <lassulus@lassul.us> | 2022-09-30 12:55:28 +0200 |
---|---|---|
committer | lassulus <lassulus@lassul.us> | 2022-10-02 16:41:02 +0200 |
commit | 9f7f23abdb161578316d94f45528fbf47982f4d9 (patch) | |
tree | 92134db7dbe059a7163571e50045b42798a2aea4 /example/zfs.nix | |
parent | a215a1975938fbc04ae8fb14e474304f3200e15c (diff) |
add nixos tests for disko.config, extend/fix existing tests
Diffstat (limited to 'example/zfs.nix')
-rw-r--r-- | example/zfs.nix | 55 |
1 files changed, 46 insertions, 9 deletions
diff --git a/example/zfs.nix b/example/zfs.nix index 16da367..92ed688 100644 --- a/example/zfs.nix +++ b/example/zfs.nix @@ -1,19 +1,56 @@ -{ +{ disks ? [ "/dev/vdb" "/dev/vdc" ] }: { disk = { - vdb = { + x = { type = "disk"; - device = "/dev/vdb"; + device = builtins.elemAt disks 0; content = { - type = "zfs"; - pool = "zroot"; + type = "table"; + format = "gpt"; + partitions = [ + { + type = "partition"; + name = "ESP"; + start = "0"; + end = "64MiB"; + fs-type = "fat32"; + bootable = true; + content = { + type = "filesystem"; + format = "vfat"; + mountpoint = "/boot"; + }; + } + { + type = "partition"; + name = "zfs"; + start = "128MiB"; + end = "100%"; + content = { + type = "zfs"; + pool = "zroot"; + }; + } + ]; }; }; - vdc = { + y = { type = "disk"; - device = "/dev/vdc"; + device = builtins.elemAt disks 1; content = { - type = "zfs"; - pool = "zroot"; + type = "table"; + format = "gpt"; + partitions = [ + { + type = "partition"; + name = "zfs"; + start = "128MiB"; + end = "100%"; + content = { + type = "zfs"; + pool = "zroot"; + }; + } + ]; }; }; }; |