Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
43 lines
1003 B
Nix
43 lines
1003 B
Nix
{ pkgs, ... }:
|
|
|
|
{
|
|
name = "cage";
|
|
meta = with pkgs.lib.maintainers; {
|
|
maintainers = [ matthewbauer ];
|
|
};
|
|
|
|
nodes.machine =
|
|
{ ... }:
|
|
|
|
{
|
|
imports = [ ./common/user-account.nix ];
|
|
|
|
fonts.packages = with pkgs; [ dejavu_fonts ];
|
|
|
|
services.cage = {
|
|
enable = true;
|
|
user = "alice";
|
|
program = "${pkgs.xterm}/bin/xterm";
|
|
};
|
|
|
|
# Need to switch to a different GPU driver than the default one (-vga std) so that Cage can launch:
|
|
virtualisation.qemu.options = [ "-vga none -device virtio-gpu-pci" ];
|
|
};
|
|
|
|
enableOCR = true;
|
|
|
|
testScript =
|
|
{ nodes, ... }:
|
|
let
|
|
user = nodes.machine.config.users.users.alice;
|
|
in
|
|
''
|
|
with subtest("Wait for cage to boot up"):
|
|
start_all()
|
|
machine.wait_for_file("/run/user/${toString user.uid}/wayland-0.lock")
|
|
machine.wait_until_succeeds("pgrep xterm")
|
|
machine.wait_for_text("alice@machine")
|
|
machine.screenshot("screen")
|
|
'';
|
|
}
|