summaryrefslogtreecommitdiffstats
path: root/nixos/tests/oxwm.nix
blob: 9dbefd747ae008b9039279b652639dce37ae7d1d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
{ lib, ... }:
{
  name = "oxwm";

  meta = {
    maintainers = with lib.maintainers; [
      sigmanificient
      tonybanters
    ];
  };

  nodes.machine =
    { pkgs, lib, ... }:
    {
      imports = [
        ./common/x11.nix
        ./common/user-account.nix
      ];
      test-support.displayManager.auto.user = "alice";
      services.displayManager.defaultSession = lib.mkForce "oxwm";
      services.xserver.windowManager.oxwm.enable = true;

      environment.systemPackages = [ pkgs.alacritty ];
    };

  testScript = ''
    with subtest("ensure x starts"):
        machine.wait_for_x()
        machine.wait_for_file("/home/alice/.Xauthority")
        machine.succeed("xauth merge ~alice/.Xauthority")

    with subtest("ensure we can open a new terminal"):
        machine.sleep(2)
        machine.send_key("meta_l-ret")
        machine.wait_for_window(r"alice.*?machine")
        machine.sleep(2)
        machine.screenshot("terminal")
  '';
}