diff --git a/nixos/modules/services/networking/sunshine.nix b/nixos/modules/services/networking/sunshine.nix index eaa769246add0..2b723b74ce7b2 100644 --- a/nixos/modules/services/networking/sunshine.nix +++ b/nixos/modules/services/networking/sunshine.nix @@ -177,6 +177,8 @@ in startLimitIntervalSec = 500; startLimitBurst = 5; + environment.PATH = lib.mkForce null; # don't use default PATH, needed for tray icon menu links to work + serviceConfig = { # only add configFile if an application or a setting other than the default port is set to allow configuration from web UI ExecStart = escapeSystemdExecArgs ( diff --git a/nixos/tests/sunshine.nix b/nixos/tests/sunshine.nix index 96ba81d620683..14e2133538712 100644 --- a/nixos/tests/sunshine.nix +++ b/nixos/tests/sunshine.nix @@ -6,6 +6,7 @@ import ./make-test-python.nix ( # test is flaky on aarch64 broken = pkgs.stdenv.hostPlatform.isAarch64; maintainers = [ lib.maintainers.devusb ]; + timeout = 600; }; nodes.sunshine = @@ -58,20 +59,23 @@ import ./make-test-python.nix ( # initiate pairing from moonlight moonlight.execute("moonlight pair sunshine --pin 1234 >&2 & disown") - moonlight.wait_for_console_text("Executing request") + moonlight.wait_for_console_text("Executing request.*pair") # respond to pairing request from sunshine - sunshine.succeed("curl --insecure -u sunshine:sunshine -d '{\"pin\": \"1234\"}' https://localhost:47990/api/pin") + sunshine.succeed("curl --fail --insecure -u sunshine:sunshine -d '{\"pin\": \"1234\"}' https://localhost:47990/api/pin") - # close moonlight once pairing complete - moonlight.send_key("kp_enter") + # wait until pairing is complete + moonlight.wait_for_console_text("Executing request.*phrase=pairchallenge") + # hide icewm panel + sunshine.send_key("ctrl-alt-h") # put words on the sunshine screen for moonlight to see - sunshine.execute("gxmessage 'hello world' -center -font 'sans 75' >&2 & disown") + sunshine.execute("gxmessage ' ABC' -center -font 'consolas 100' -fg '#FFFFFF' -bg '#000000' -borderless -geometry '2000x2000' -buttons \"\" >&2 & disown") # connect to sunshine from moonlight and look for the words moonlight.execute("moonlight --video-decoder software stream sunshine 'Desktop' >&2 & disown") - moonlight.wait_for_text("hello world") + moonlight.wait_for_console_text("Dropping window event during flush") + moonlight.wait_for_text("ABC") ''; } ) diff --git a/pkgs/servers/sunshine/0001-fix-upnp-support-newer-miniupnpc-library-2782.patch b/pkgs/by-name/su/sunshine/0001-fix-upnp-support-newer-miniupnpc-library-2782.patch similarity index 100% rename from pkgs/servers/sunshine/0001-fix-upnp-support-newer-miniupnpc-library-2782.patch rename to pkgs/by-name/su/sunshine/0001-fix-upnp-support-newer-miniupnpc-library-2782.patch diff --git a/pkgs/servers/sunshine/package-lock.json b/pkgs/by-name/su/sunshine/package-lock.json similarity index 100% rename from pkgs/servers/sunshine/package-lock.json rename to pkgs/by-name/su/sunshine/package-lock.json diff --git a/pkgs/servers/sunshine/default.nix b/pkgs/by-name/su/sunshine/package.nix similarity index 100% rename from pkgs/servers/sunshine/default.nix rename to pkgs/by-name/su/sunshine/package.nix diff --git a/pkgs/servers/sunshine/updater.sh b/pkgs/by-name/su/sunshine/updater.sh similarity index 100% rename from pkgs/servers/sunshine/updater.sh rename to pkgs/by-name/su/sunshine/updater.sh diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 65b291f35ddc6..47dc590a3c6b7 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -18745,7 +18745,9 @@ with pkgs; sieveshell = with python3.pkgs; toPythonApplication managesieve; - sunshine = callPackage ../servers/sunshine { }; + sunshine = callPackage ../by-name/su/sunshine/package.nix { + boost = boost185; + }; jami = qt6Packages.callPackage ../applications/networking/instant-messengers/jami { # TODO: remove once `udev` is `systemdMinimal` everywhere.