1 import ./make-test-python.nix ({ pkgs, lib, ... }: {
5 maintainers = with lib.maintainers; [ OPNA2608 ];
8 nodes.machine = { config, ... }: {
11 ./common/user-account.nix
14 # Seems to very rarely get interrupted by oom-killer
15 virtualisation.memorySize = 2047;
17 test-support.displayManager.auto = {
24 displayManager.defaultSession = lib.mkForce "miriway";
30 add-wayland-extensions=all
33 ctrl-alt=t:foot --maximized
34 ctrl-alt=a:env WINIT_UNIX_BACKEND=x11 WAYLAND_DISPLAY=invalid alacritty --option window.startup_mode=maximized
36 shell-component=dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY
38 shell-component=foot --maximized
44 test-wayland = "wayland-info | tee /tmp/test-wayland.out && touch /tmp/test-wayland-exit-ok";
45 test-x11 = "glinfo | tee /tmp/test-x11.out && touch /tmp/test-x11-exit-ok";
48 systemPackages = with pkgs; [
56 etc."xdg/foot/foot.ini".text = lib.generators.toINI { } {
58 font = "inconsolata:size=16";
61 foreground = "000000";
62 background = "ffffff";
63 regular2 = foreground;
66 etc."xdg/alacritty/alacritty.yml".text = lib.generators.toYAML { } {
68 normal.family = "Inconsolata";
69 bold.family = normal.family;
70 italic.family = normal.family;
71 bold_italic.family = normal.family;
76 foreground = "0x000000";
77 background = "0xffffff";
80 green = primary.foreground;
86 fonts.packages = [ pkgs.inconsolata ];
91 testScript = { nodes, ... }: ''
93 machine.wait_for_unit("multi-user.target")
95 # Wait for Miriway to complete startup
96 machine.wait_for_file("/run/user/1000/wayland-0")
97 machine.succeed("pgrep miriway-shell")
98 machine.screenshot("miriway_launched")
101 # We let Miriway start the first terminal, as we might get stuck if it's not ready to process the first keybind
102 # machine.send_key("ctrl-alt-t")
103 machine.wait_for_text("alice@machine")
104 machine.send_chars("test-wayland\n")
105 machine.wait_for_file("/tmp/test-wayland-exit-ok")
106 machine.copy_from_vm("/tmp/test-wayland.out")
107 machine.screenshot("foot_wayland_info")
108 # Only succeeds when a mouse is moved inside an interactive session?
109 # machine.send_chars("exit\n")
110 # machine.wait_until_fails("pgrep foot")
111 machine.succeed("pkill foot")
114 machine.send_key("ctrl-alt-a")
115 machine.wait_for_text("alice@machine")
116 machine.send_chars("test-x11\n")
117 machine.wait_for_file("/tmp/test-x11-exit-ok")
118 machine.copy_from_vm("/tmp/test-x11.out")
119 machine.screenshot("alacritty_glinfo")
120 # Only succeeds when a mouse is moved inside an interactive session?
121 # machine.send_chars("exit\n")
122 # machine.wait_until_fails("pgrep alacritty")
123 machine.succeed("pkill alacritty")