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/complex.nix | |
parent | a215a1975938fbc04ae8fb14e474304f3200e15c (diff) |
add nixos tests for disko.config, extend/fix existing tests
Diffstat (limited to 'example/complex.nix')
-rw-r--r-- | example/complex.nix | 49 |
1 files changed, 28 insertions, 21 deletions
diff --git a/example/complex.nix b/example/complex.nix index 078f9c5..7ee9282 100644 --- a/example/complex.nix +++ b/example/complex.nix @@ -1,25 +1,40 @@ -{ +{ disks ? [ "/dev/vdb" "/dev/vdc" ] }: { disk = { - disk1 = { + disk0 = { type = "disk"; - device = "/dev/vdb"; + device = builtins.elemAt disks 0; content = { type = "table"; format = "gpt"; partitions = [ { type = "partition"; - start = "0"; - end = "1M"; - name = "grub"; - flags = ["bios_grub"]; + name = "ESP"; + start = "1MiB"; + end = "128MiB"; + fs-type = "fat32"; + bootable = true; + content = { + type = "filesystem"; + format = "vfat"; + mountpoint = "/boot"; + }; } + ]; + }; + }; + disk1 = { + type = "disk"; + device = builtins.elemAt disks 1; + content = { + type = "table"; + format = "gpt"; + partitions = [ { type = "partition"; start = "1M"; end = "100%"; name = "luks"; - bootable = true; content = { type = "luks"; name = "crypted1"; @@ -39,24 +54,16 @@ }; disk2 = { type = "disk"; - device = "/dev/vdc"; + device = builtins.elemAt disks 2; content = { type = "table"; format = "gpt"; partitions = [ { type = "partition"; - start = "0"; - end = "1M"; - name = "grub"; - flags = ["bios_grub"]; - } - { - type = "partition"; start = "1M"; end = "100%"; name = "luks"; - bootable = true; content = { type = "luks"; name = "crypted2"; @@ -81,17 +88,17 @@ level = 1; content = { type = "table"; - format = "msdos"; + format = "gpt"; partitions = [ { type = "partition"; - name = "xfs"; + name = "bla"; start = "1MiB"; end = "100%"; content = { type = "filesystem"; - format = "xfs"; - mountpoint = "/xfs_mdadm_lvm"; + format = "ext4"; + mountpoint = "/ext4_mdadm_lvm"; }; } ]; |