# 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-keyboard -- the uploaded keymap, keyboard focus, and a decoded symbol # vm-keyboard-de -- the same check with sessions.keyboard.layout = "de" # vm-stream-firewall -- the stream's port in the guest's own running firewall # # 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; vm-keyboard = pkgs.callPackage ./vm-keyboard.nix sessionArgs; vm-keyboard-de = pkgs.callPackage ./vm-keyboard.nix ( sessionArgs // { keyboardLayout = "de"; } ); # 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; }; }