Files
bootvine/vm-tests/default.nix
T
Willem Vanhulle 7e95cbd8e9 feat: show why units failed, with their last journal lines
Failed jobs keep their kind: units that broke or timed out get a failure
panel entry with the reason systemd reports (exit status, signal, timeout,
start limit, status text) and their last journal lines read through
libsystemd. Units that failed only through a dependency are dimmed and left
out of the panel, and units that crash after starting count as failed.

Restructure the repository around this:
- move the library and binary into bootvine/ and the scripted demos into
  their own unpublished scripted-demos crate, with their VHS tapes
- move the crane builds and NixOS module into nix/
- group each sample VM with its check under vm-tests/, adding text-console,
  scripted-initrd, encrypted-volume and failures machines and a vm-failures
  check
- add docs/guide.md walking through the screen with every recording, keep
  one recording in the README, and re-render all recordings
2026-10-30 14:59:10 +01:00

52 lines
1.1 KiB
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: {
vm-boot-and-shutdown = pkgs.testers.runNixOSTest (
import ./slow-services/check.nix { machine = machines.slow-services; }
);
vm-luks-passphrase = pkgs.testers.runNixOSTest (
import ./encrypted-volume/check.nix {
machine = machines.encrypted-volume;
inherit pkgs;
}
);
vm-failures = pkgs.testers.runNixOSTest (
import ./failures/check.nix { machine = machines.failures; }
);
};
}