2022-08-29 12:45:19 +03:00
|
|
|
{ pkgs ? (import <nixpkgs> { })
|
|
|
|
, makeDiskoTest ? (pkgs.callPackage ./lib.nix { }).makeDiskoTest
|
|
|
|
}:
|
|
|
|
makeDiskoTest {
|
2022-10-29 14:19:29 +03:00
|
|
|
disko-config = ../example/complex.nix;
|
2022-09-30 13:55:28 +03:00
|
|
|
extraConfig = {
|
|
|
|
fileSystems."/zfs_legacy_fs".options = [ "nofail" ]; # TODO find out why we need this!
|
|
|
|
};
|
2022-08-29 12:45:19 +03:00
|
|
|
extraTestScript = ''
|
|
|
|
machine.succeed("test -b /dev/zroot/zfs_testvolume");
|
|
|
|
machine.succeed("test -b /dev/md/raid1p1");
|
|
|
|
|
|
|
|
|
2022-09-30 13:55:28 +03:00
|
|
|
machine.succeed("mountpoint /zfs_fs");
|
|
|
|
machine.succeed("mountpoint /zfs_legacy_fs");
|
|
|
|
machine.succeed("mountpoint /ext4onzfs");
|
|
|
|
machine.succeed("mountpoint /ext4_on_lvm");
|
|
|
|
'';
|
|
|
|
enableOCR = true;
|
|
|
|
bootCommands = ''
|
|
|
|
machine.wait_for_text("Passphrase for")
|
|
|
|
machine.send_chars("secret\n")
|
2022-08-29 12:45:19 +03:00
|
|
|
'';
|
|
|
|
extraConfig = {
|
|
|
|
boot.kernelModules = [ "dm-raid" "dm-mirror" ];
|
|
|
|
};
|
|
|
|
}
|