Each sample machine now has a VM check, including new ones for text-console and scripted-initrd. While a check runs, a recorder takes a frame every half second through a second QEMU monitor socket, and record-screencasts encodes the frames into recordings/<machine>.webp with img2webp, dropping the BIOS frames at other resolutions. The guide shows each machine's recording in the section it illustrates, replacing the PNG screenshots. The checks are now named vm-<machine>.
44 lines
883 B
Nix
44 lines
883 B
Nix
{ lib, bootvineModule }:
|
|
let
|
|
machineModule = machineName: {
|
|
imports = [
|
|
bootvineModule
|
|
./shared/common.nix
|
|
./${machineName}/machine.nix
|
|
];
|
|
networking.hostName = "bootvine-${machineName}";
|
|
};
|
|
|
|
machineNames = [
|
|
"slow-services"
|
|
"text-console"
|
|
"scripted-initrd"
|
|
"encrypted-volume"
|
|
"failures"
|
|
];
|
|
|
|
machines = lib.genAttrs machineNames machineModule;
|
|
in
|
|
{
|
|
inherit machines;
|
|
|
|
sampleUnits = import ./slow-services/sample-units.nix;
|
|
|
|
nixosSystemFor =
|
|
system: machineName:
|
|
lib.nixosSystem {
|
|
inherit system;
|
|
modules = [
|
|
machines.${machineName}
|
|
(import ./shared/interactive-vm.nix machineName)
|
|
];
|
|
};
|
|
|
|
checksFor =
|
|
pkgs:
|
|
lib.mapAttrs (
|
|
machineName: machine:
|
|
pkgs.testers.runNixOSTest (import ./${machineName}/check.nix { inherit machine pkgs; })
|
|
) machines;
|
|
}
|