clan-core/checks/wayland-proxy-virtwl/default.nix
Jörg Thalheim 9dfc3f9613
All checks were successful
checks / test (pull_request) Successful in 58s
checks-impure / test (pull_request) Successful in 1m13s
add wayland-proxy-virtwl module
2023-12-15 14:14:20 +01:00

30 lines
1.2 KiB
Nix

import ../lib/test-base.nix ({ config, pkgs, lib, ... }: {
name = "wayland-proxy-virtwl";
nodes.machine = { self, ... }: {
imports = [
self.nixosModules.clanCore
{
clanCore.machineName = "machine";
clanCore.clanDir = ./.;
}
];
services.wayland-proxy-virtwl.enable = true;
virtualisation.qemu.options = [
"-vga none -device virtio-gpu-rutabaga,cross-domain=on,hostmem=4G,wsi=headless"
];
virtualisation.qemu.package = lib.mkForce self.packages.${pkgs.hostPlatform.system}.qemu-wayland;
};
# FIXME: currently we still see this error in the build sandbox,
# but it gives us some smoke test
# vm-test-run-wayland-proxy-virtwl> machine # qemu-kvm: The errno is ENOENT: No such file or directory
# vm-test-run-wayland-proxy-virtwl> machine # qemu-kvm: CHECK failed in rutabaga_cmd_submit_3d() ../hw/display/virtio-gpu-rutabaga.c:341
# vm-test-run-wayland-proxy-virtwl> machine # qemu-kvm: virtio_gpu_rutabaga_process_cmd: ctrl 0x207, error 0x1200
testScript = ''
start_all()
# use machinectl
machine.succeed("machinectl shell .host ${config.nodes.machine.systemd.package}/bin/systemctl --user start wayland-proxy-virtwl >&2")
'';
})