Files
hyprland-headless-stream-pl…/checks/default.nix
T
Hermenix 994fdb1cfb Merge keyboard input (feat/keyboard-input @561e0c2) for a live trial on this machine
The same shape as the merge that branch got on 2026-10-05 (edbf15f on
feat/session-live-stream): this machine's own config sets
`sessions.keyboard.layout`, so a ref without the keyboard work does not
evaluate -- and the point of this branch is to be consumed here.

The stream branch's own commit is the first parent, so PR #2 stays based on
main and carries none of this merge. Conflicts were additive on both sides
(new option blocks, new checks, new README rows) and are resolved by keeping
both.
2026-10-11 02:23:11 +00:00

76 lines
3.0 KiB
Nix

# The flake's `checks` output. One file per check; this is only the wiring.
#
# unit -- pytest over tests/, against the nix/package.nix build
# vm-basic -- nixosTest with a fake capture backend: module + wire contract
# vm-hyprland -- nixosTest with the real compositor and grim
# vm-sessions -- nixosTest with the real compositor and the session broker
# vm-ipc -- the compositor's IPC sockets, and an event that arrives
# vm-containers -- one output and one workspace per session
# vm-pointer -- the lease, the driver, and a click the application saw
# vm-stream-firewall -- the stream's port in the guest's own running firewall
# vm-keyboard -- the uploaded keymap, keyboard focus, and a decoded symbol
# vm-keyboard-de -- the same check with sessions.keyboard.layout = "de"
#
# What the guests need lives in checks/lib: `test-tools.nix` for the fake
# capture and the contract asserter, `session-tools.nix` for the event
# subscriber and the two input targets, `session-machine.nix` for the guest the
# session checks share, and `session-prelude.nix` for their test-script
# helpers.
#
# `vm-keyboard` and `vm-keyboard-de` are one file twice over, and that is the
# point: `sessions.keyboard.layout` reaches the uploaded keymap only through
# the driver unit's argv, and a single-layout check cannot tell that path from
# a hardcoded `us`. See the header of vm-keyboard.nix.
#
# Run them ONE AT A TIME. Each boots a VM with a software-rendered compositor;
# two at once on a two-core machine make the timing-sensitive assertions flake,
# and a flaky green is worth less than a slow one.
{
pkgs,
self,
system,
}:
let
hhstream = self.packages.${system}.hhstream;
hhsModule = self.nixosModules.default;
testTools = pkgs.callPackage ./lib/test-tools.nix { };
# The session checks take the same arguments; naming them once keeps a new
# check from being wired up with a different compositor or a different
# package than its neighbours.
sessionArgs = {
inherit hhstream hhsModule testTools;
};
in
{
unit = pkgs.callPackage ./unit.nix { inherit hhstream; };
vm-basic = pkgs.callPackage ./vm-basic.nix {
inherit hhstream hhsModule testTools;
};
vm-hyprland = pkgs.callPackage ./vm-hyprland.nix {
inherit hhstream hhsModule testTools;
};
vm-sessions = pkgs.callPackage ./vm-sessions.nix {
inherit hhstream hhsModule testTools;
};
vm-ipc = pkgs.callPackage ./vm-ipc.nix sessionArgs;
vm-containers = pkgs.callPackage ./vm-containers.nix sessionArgs;
vm-pointer = pkgs.callPackage ./vm-pointer.nix sessionArgs;
# Not a `sessionArgs` consumer: this one is about the module's own options,
# not about the broker or the compositor (see the file's header).
vm-stream-firewall = pkgs.callPackage ./vm-stream-firewall.nix {
inherit hhstream hhsModule testTools;
};
vm-keyboard = pkgs.callPackage ./vm-keyboard.nix sessionArgs;
vm-keyboard-de = pkgs.callPackage ./vm-keyboard.nix (
sessionArgs // { keyboardLayout = "de"; }
);
}