diff options
Diffstat (limited to 'modules/xnet/disk/layouts/mirror.nix')
| -rw-r--r-- | modules/xnet/disk/layouts/mirror.nix | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/modules/xnet/disk/layouts/mirror.nix b/modules/xnet/disk/layouts/mirror.nix new file mode 100644 index 0000000..5a9835b --- /dev/null +++ b/modules/xnet/disk/layouts/mirror.nix @@ -0,0 +1,43 @@ +devices: { + disk = builtins.listToAttrs (map + (device: { + name = device; + value = { + type = "disk"; + device = "/dev/${device}"; + content = { + type = "gpt"; + partitions = { + ESP = { + size = "1G"; + type = "EF00"; + content = { + type = "mdraid"; + name = "boot"; + }; + }; + ZFS = { + size = "100%"; + content = { + type = "zfs"; + pool = "zroot"; + }; + }; + }; + }; + }; + }) + devices); + mdadm = { + boot = { + type = "mdadm"; + level = 1; + metadata = "1.0"; + content = { + type = "filesystem"; + format = "vfat"; + mountpoint = "/boot"; + }; + }; + }; +} |
