diff options
author | lassulus <lassulus@lassul.us> | 2022-10-23 12:29:13 +0200 |
---|---|---|
committer | lassulus <lassulus@lassul.us> | 2022-10-23 12:29:13 +0200 |
commit | c777d1ca4ff0f759a6517eb2a4d7e9bae1fa9fd2 (patch) | |
tree | e78d372713246731777ca99793582a3dc1a02a67 | |
parent | 87e93073ac762993a0bf27bc65af570226586ae5 (diff) |
tests: add simple-efi
-rw-r--r-- | example/simple-efi.nix | 40 | ||||
-rw-r--r-- | tests/simple-efi.nix | 9 |
2 files changed, 49 insertions, 0 deletions
diff --git a/example/simple-efi.nix b/example/simple-efi.nix new file mode 100644 index 0000000..c69c847 --- /dev/null +++ b/example/simple-efi.nix @@ -0,0 +1,40 @@ +{ disks ? [ "/dev/vdb" ], ... }: { + disk = { + vdb = { + device = builtins.elemAt disks 0; + type = "disk"; + content = { + type = "table"; + format = "gpt"; + partitions = [ + { + type = "partition"; + name = "ESP"; + start = "1MiB"; + end = "100MiB"; + bootable = true; + content = { + type = "filesystem"; + format = "vfat"; + mountpoint = "/boot"; + }; + } + { + name = "root"; + type = "partition"; + start = "100MiB"; + end = "100%"; + part-type = "primary"; + bootable = true; + content = { + type = "filesystem"; + format = "ext4"; + mountpoint = "/"; + }; + } + ]; + }; + }; + }; +} + diff --git a/tests/simple-efi.nix b/tests/simple-efi.nix new file mode 100644 index 0000000..2d3b92d --- /dev/null +++ b/tests/simple-efi.nix @@ -0,0 +1,9 @@ +{ pkgs ? (import <nixpkgs> { }) +, makeDiskoTest ? (pkgs.callPackage ./lib.nix { }).makeDiskoTest +}: +makeDiskoTest { + disko-config = import ../example/simple-efi.nix; + extraTestScript = '' + machine.succeed("mountpoint /"); + ''; +} |