diff --git a/nixos/tests/maestral.nix b/nixos/tests/maestral.nix index ba2e0b2f3baa..67a265926187 100644 --- a/nixos/tests/maestral.nix +++ b/nixos/tests/maestral.nix @@ -52,7 +52,7 @@ import ./make-test-python.nix ({ pkgs, ... }: { testScript = { nodes, ... }: let - user = nodes.cli.config.users.users.alice; + user = nodes.cli.users.users.alice; in '' start_all() @@ -65,7 +65,8 @@ import ./make-test-python.nix ({ pkgs, ... }: { with subtest("GUI"): gui.wait_for_x() - gui.succeed("xauth merge ${user.home}/.Xauthority") + gui.wait_for_file("/tmp/xauth_*") + gui.succeed("xauth merge /tmp/xauth_*") gui.wait_for_window("^Desktop ") gui.wait_for_unit("maestral.service", "${user.name}") ''; diff --git a/nixos/tests/plasma-bigscreen.nix b/nixos/tests/plasma-bigscreen.nix index 1c61cafcbff3..2fe90fa9b539 100644 --- a/nixos/tests/plasma-bigscreen.nix +++ b/nixos/tests/plasma-bigscreen.nix @@ -22,14 +22,11 @@ import ./make-test-python.nix ({ pkgs, ...} : users.users.alice.extraGroups = ["uinput"]; }; - testScript = { nodes, ... }: let - user = nodes.machine.users.users.alice; - xdo = "${pkgs.xdotool}/bin/xdotool"; - in '' + testScript = { nodes, ... }: '' with subtest("Wait for login"): start_all() - machine.wait_for_file("${user.home}/.Xauthority") - machine.succeed("xauth merge ${user.home}/.Xauthority") + machine.wait_for_file("/tmp/xauth_*") + machine.succeed("xauth merge /tmp/xauth_*") with subtest("Check plasmashell started"): machine.wait_until_succeeds("pgrep plasmashell") diff --git a/nixos/tests/plasma5-systemd-start.nix b/nixos/tests/plasma5-systemd-start.nix index f584c1ec137a..31a313af308b 100644 --- a/nixos/tests/plasma5-systemd-start.nix +++ b/nixos/tests/plasma5-systemd-start.nix @@ -23,13 +23,11 @@ import ./make-test-python.nix ({ pkgs, ...} : }; }; - testScript = { nodes, ... }: let - user = nodes.machine.config.users.users.alice; - in '' + testScript = { nodes, ... }: '' with subtest("Wait for login"): start_all() - machine.wait_for_file("${user.home}/.Xauthority") - machine.succeed("xauth merge ${user.home}/.Xauthority") + machine.wait_for_file("/tmp/xauth_*") + machine.succeed("xauth merge /tmp/xauth_*") with subtest("Check plasmashell started"): machine.wait_until_succeeds("pgrep plasmashell") diff --git a/nixos/tests/plasma5.nix b/nixos/tests/plasma5.nix index b3836cf641d4..fb8a5b73832e 100644 --- a/nixos/tests/plasma5.nix +++ b/nixos/tests/plasma5.nix @@ -13,10 +13,8 @@ import ./make-test-python.nix ({ pkgs, ...} : services.xserver.enable = true; services.xserver.displayManager.sddm.enable = true; services.xserver.displayManager.defaultSession = "plasma"; - services.xserver.desktopManager.plasma5 = { - enable = true; - excludePackages = [ pkgs.plasma5Packages.elisa ]; - }; + services.xserver.desktopManager.plasma5.enable = true; + environment.plasma5.excludePackages = [ pkgs.plasma5Packages.elisa ]; services.xserver.displayManager.autoLogin = { enable = true; user = "alice"; @@ -25,13 +23,13 @@ import ./make-test-python.nix ({ pkgs, ...} : }; testScript = { nodes, ... }: let - user = nodes.machine.config.users.users.alice; + user = nodes.machine.users.users.alice; xdo = "${pkgs.xdotool}/bin/xdotool"; in '' with subtest("Wait for login"): start_all() - machine.wait_for_file("${user.home}/.Xauthority") - machine.succeed("xauth merge ${user.home}/.Xauthority") + machine.wait_for_file("/tmp/xauth_*") + machine.succeed("xauth merge /tmp/xauth_*") with subtest("Check plasmashell started"): machine.wait_until_succeeds("pgrep plasmashell") @@ -46,6 +44,8 @@ import ./make-test-python.nix ({ pkgs, ...} : with subtest("Ensure Elisa is not installed"): machine.fail("which elisa") + machine.succeed("su - ${user.name} -c 'xauth merge /tmp/xauth_*'") + with subtest("Run Dolphin"): machine.execute("su - ${user.name} -c 'DISPLAY=:0.0 dolphin >&2 &'") machine.wait_for_window(" Dolphin") diff --git a/nixos/tests/retroarch.nix b/nixos/tests/retroarch.nix index f4bf232ea725..0e5f60aa8be2 100644 --- a/nixos/tests/retroarch.nix +++ b/nixos/tests/retroarch.nix @@ -30,8 +30,8 @@ import ./make-test-python.nix ({ pkgs, ... }: in '' with subtest("Wait for login"): start_all() - machine.wait_for_file("${user.home}/.Xauthority") - machine.succeed("xauth merge ${user.home}/.Xauthority") + machine.wait_for_file("/tmp/xauth_*") + machine.succeed("xauth merge /tmp/xauth_*") with subtest("Check RetroArch started"): machine.wait_until_succeeds("pgrep retroarch")