1 import ./make-test-python.nix (
7 maintainers = with lib.maintainers; [ OPNA2608 ];
15 ./common/user-account.nix
18 # Seems to very rarely get interrupted by oom-killer
19 virtualisation.memorySize = 2047;
21 test-support.displayManager.auto = {
26 services.xserver.enable = true;
27 services.displayManager.defaultSession = lib.mkForce "miriway";
32 add-wayland-extensions=all
35 ctrl-alt=t:foot --maximized
36 ctrl-alt=a:env WINIT_UNIX_BACKEND=x11 WAYLAND_DISPLAY= alacritty --option window.startup_mode=\"maximized\"
38 shell-component=dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY
40 shell-component=foot --maximized
46 test-wayland = "wayland-info | tee /tmp/test-wayland.out && touch /tmp/test-wayland-exit-ok";
47 test-x11 = "glinfo | tee /tmp/test-x11.out && touch /tmp/test-x11-exit-ok";
50 systemPackages = with pkgs; [
58 etc."xdg/foot/foot.ini".text = lib.generators.toINI { } {
60 font = "inconsolata:size=16";
63 foreground = "000000";
64 background = "ffffff";
65 regular2 = foreground;
68 etc."xdg/alacritty/alacritty.yml".text = lib.generators.toYAML { } {
70 normal.family = "Inconsolata";
71 bold.family = normal.family;
72 italic.family = normal.family;
73 bold_italic.family = normal.family;
78 foreground = "0x000000";
79 background = "0xffffff";
82 green = primary.foreground;
88 fonts.packages = [ pkgs.inconsolata ];
97 machine.wait_for_unit("multi-user.target")
99 # Wait for Miriway to complete startup
100 machine.wait_for_file("/run/user/1000/wayland-0")
101 machine.succeed("pgrep miriway-shell")
102 machine.screenshot("miriway_launched")
105 # We let Miriway start the first terminal, as we might get stuck if it's not ready to process the first keybind
106 # machine.send_key("ctrl-alt-t")
107 machine.wait_for_text(r"(alice|machine)")
108 machine.send_chars("test-wayland\n")
109 machine.wait_for_file("/tmp/test-wayland-exit-ok")
110 machine.copy_from_vm("/tmp/test-wayland.out")
111 machine.screenshot("foot_wayland_info")
112 # Only succeeds when a mouse is moved inside an interactive session?
113 # machine.send_chars("exit\n")
114 # machine.wait_until_fails("pgrep foot")
115 machine.succeed("pkill foot")
118 machine.send_key("ctrl-alt-a")
119 machine.wait_for_text(r"(alice|machine)")
120 machine.send_chars("test-x11\n")
121 machine.wait_for_file("/tmp/test-x11-exit-ok")
122 machine.copy_from_vm("/tmp/test-x11.out")
123 machine.screenshot("alacritty_glinfo")
124 # Only succeeds when a mouse is moved inside an interactive session?
125 # machine.send_chars("exit\n")
126 # machine.wait_until_fails("pgrep alacritty")
127 machine.succeed("pkill alacritty")