Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
56 lines
1.4 KiB
Nix
56 lines
1.4 KiB
Nix
{ pkgs, ... }:
|
|
|
|
{
|
|
name = "retroarch";
|
|
meta = with pkgs.lib; {
|
|
maintainers = teams.libretro.members ++ [ maintainers.j0hax ];
|
|
};
|
|
|
|
nodes.machine =
|
|
{ ... }:
|
|
|
|
{
|
|
imports = [ ./common/user-account.nix ];
|
|
services.xserver.enable = true;
|
|
services.xserver.desktopManager.retroarch = {
|
|
enable = true;
|
|
package = pkgs.retroarch-bare;
|
|
};
|
|
services.displayManager = {
|
|
sddm.enable = true;
|
|
defaultSession = "RetroArch";
|
|
autoLogin = {
|
|
enable = true;
|
|
user = "alice";
|
|
};
|
|
};
|
|
};
|
|
|
|
testScript =
|
|
{ nodes, ... }:
|
|
let
|
|
user = nodes.machine.users.users.alice;
|
|
xdo = "${pkgs.xdotool}/bin/xdotool";
|
|
in
|
|
''
|
|
with subtest("Wait for login"):
|
|
start_all()
|
|
machine.wait_for_file("/run/sddm/xauth_*")
|
|
machine.wait_until_succeeds("test -s /run/sddm/xauth_*")
|
|
machine.succeed("xauth merge /run/sddm/xauth_*")
|
|
|
|
with subtest("Check RetroArch started"):
|
|
machine.wait_until_succeeds("pgrep retroarch")
|
|
machine.wait_for_window("^RetroArch")
|
|
|
|
with subtest("Check configuration created"):
|
|
machine.wait_for_file("${user.home}/.config/retroarch/retroarch.cfg")
|
|
|
|
with subtest("Wait to get a screenshot"):
|
|
machine.execute(
|
|
"${xdo} key Alt+F1 sleep 10"
|
|
)
|
|
machine.screenshot("screen")
|
|
'';
|
|
}
|