1 import ./make-test-python.nix (
5 meta.maintainers = with lib.maintainers; [
13 imports = [ ./common/user-account.nix ];
15 environment.systemPackages = with pkgs; [ icewm ];
17 services.getty.autologinUser = "alice";
21 displayManager.sx.enable = true;
24 # Create sxrc file on login and start sx
25 programs.bash.loginShellInit =
28 mkdir -p "$HOME/.config/sx"
29 echo 'exec icewm' > "$HOME/.config/sx/sxrc"
30 chmod +x "$HOME/.config/sx/sxrc"
39 user = nodes.machine.users.users.alice;
45 machine.wait_for_unit("multi-user.target")
47 xauthority = "${user.home}/.local/share/sx/xauthority"
48 machine.wait_for_file(xauthority)
49 machine.succeed(f"xauth merge {xauthority}")
51 def icewm_is_visible(_last_try: bool) -> bool:
52 # sx will set DISPLAY as the TTY number we started, in this case
54 # https://github.com/Earnestly/sx/blob/master/sx#L41.
55 # We can't use `machine.wait_for_window` here since we are running
56 # X as alice and not root.
57 return "IceWM" in machine.succeed("DISPLAY=:1 xwininfo -root -tree")
59 # Adding a retry logic to increase reliability
60 retry(icewm_is_visible)