From c12ef9e01ea34e82f6793155dbb34701ff2166ff Mon Sep 17 00:00:00 2001 From: John Ogle Date: Mon, 11 May 2026 20:57:29 -0700 Subject: [PATCH] Update stremio-linux-shell to use unstable for Rust 1.92+ --- .../ses_1e5e3566cffeYr3gZgqACwW0qm.json | 10 ++++++++ .../ses_1e5e4b78bffe01ZuWIm5nkP1W2.json | 11 ++++++++ flake.nix | 24 +++++++++++------- packages/default.nix | 2 +- packages/stremio-linux-shell/Cargo.lock.patch | 2 ++ roles/desktop/gaming.nix | 5 ++++ roles/kodi/default.nix | 25 ++++++++++++++++--- 7 files changed, 65 insertions(+), 14 deletions(-) create mode 100644 .sisyphus/run-continuation/ses_1e5e3566cffeYr3gZgqACwW0qm.json create mode 100644 .sisyphus/run-continuation/ses_1e5e4b78bffe01ZuWIm5nkP1W2.json create mode 100644 packages/stremio-linux-shell/Cargo.lock.patch diff --git a/.sisyphus/run-continuation/ses_1e5e3566cffeYr3gZgqACwW0qm.json b/.sisyphus/run-continuation/ses_1e5e3566cffeYr3gZgqACwW0qm.json new file mode 100644 index 0000000..0b5ac3b --- /dev/null +++ b/.sisyphus/run-continuation/ses_1e5e3566cffeYr3gZgqACwW0qm.json @@ -0,0 +1,10 @@ +{ + "sessionID": "ses_1e5e3566cffeYr3gZgqACwW0qm", + "updatedAt": "2026-05-12T03:42:20.568Z", + "sources": { + "background-task": { + "state": "idle", + "updatedAt": "2026-05-12T03:42:20.568Z" + } + } +} \ No newline at end of file diff --git a/.sisyphus/run-continuation/ses_1e5e4b78bffe01ZuWIm5nkP1W2.json b/.sisyphus/run-continuation/ses_1e5e4b78bffe01ZuWIm5nkP1W2.json new file mode 100644 index 0000000..e0215a0 --- /dev/null +++ b/.sisyphus/run-continuation/ses_1e5e4b78bffe01ZuWIm5nkP1W2.json @@ -0,0 +1,11 @@ +{ + "sessionID": "ses_1e5e4b78bffe01ZuWIm5nkP1W2", + "updatedAt": "2026-05-12T03:33:07.373Z", + "sources": { + "background-task": { + "state": "active", + "reason": "1 background task(s) active", + "updatedAt": "2026-05-12T03:33:07.373Z" + } + } +} \ No newline at end of file diff --git a/flake.nix b/flake.nix index 9818301..bfc4eea 100644 --- a/flake.nix +++ b/flake.nix @@ -84,6 +84,12 @@ custom = prev.callPackage ./packages { }; # Compatibility: bitwarden renamed to bitwarden-desktop in unstable bitwarden-desktop = prev.bitwarden-desktop or prev.bitwarden; + # Override stremio-linux-shell with custom GTK4/master branch version + # Use nixpkgs-unstable for Rust 1.92+ support required by master branch + stremio-linux-shell = (import nixpkgs-unstable { + system = prev.stdenv.hostPlatform.system; + config.allowUnfree = true; + }).callPackage ./packages/stremio-linux-shell { }; }); # Shared home-manager configuration factory @@ -291,16 +297,16 @@ permittedInsecurePackages = [ "qtwebengine-5.15.19" ]; }; }; - in + in { - "custom-claude-code" = pkgs.custom.claude-code; - "custom-app-launcher-server" = pkgs.custom.app-launcher-server; - "custom-mcrcon-rbw" = pkgs.custom.mcrcon-rbw; - "custom-tea-rbw" = pkgs.custom.tea-rbw; - "custom-rclone-torbox-setup" = pkgs.custom.rclone-torbox-setup; - "custom-opencode" = pkgs.custom.opencode; - "custom-qmd" = pkgs.custom.qmd; - "custom-stremio-linux-shell" = pkgs.custom.stremio-linux-shell; + "custom-claude-code" = pkgs.custom.claude-code; + "custom-app-launcher-server" = pkgs.custom.app-launcher-server; + "custom-mcrcon-rbw" = pkgs.custom.mcrcon-rbw; + "custom-tea-rbw" = pkgs.custom.tea-rbw; + "custom-rclone-torbox-setup" = pkgs.custom.rclone-torbox-setup; + "custom-opencode" = pkgs.custom.opencode; + "custom-qmd" = pkgs.custom.qmd; + "stremio-linux-shell" = pkgs.stremio-linux-shell; "qt-pinned-jellyfin-media-player" = pkgsQt.jellyfin-media-player; # "qt-pinned-stremio" = pkgsQt.stremio; # Replaced by stremio-linux-shell (Rust/CEF-based) diff --git a/packages/default.nix b/packages/default.nix index 2c2b20f..0e742db 100644 --- a/packages/default.nix +++ b/packages/default.nix @@ -11,5 +11,5 @@ rec { qmd = pkgs.callPackage ./qmd { }; openclaw-image = pkgs.callPackage ./openclaw-image { }; openclaw-runtime-closure = pkgs.callPackage ./openclaw-image/runtime-closure.nix { inherit qmd; }; - stremio-linux-shell = pkgs.callPackage ./stremio-linux-shell { }; + # stremio-linux-shell is defined in flake.nix to use nixpkgs-unstable for Rust 1.92+ support } diff --git a/packages/stremio-linux-shell/Cargo.lock.patch b/packages/stremio-linux-shell/Cargo.lock.patch new file mode 100644 index 0000000..96ed4db --- /dev/null +++ b/packages/stremio-linux-shell/Cargo.lock.patch @@ -0,0 +1,2 @@ +# This patch would need to be applied to fix dependency version issues +# For now, let's try a different approach - use a snapshot of the repo before the breaking changes diff --git a/roles/desktop/gaming.nix b/roles/desktop/gaming.nix index 65595af..7997f59 100644 --- a/roles/desktop/gaming.nix +++ b/roles/desktop/gaming.nix @@ -36,6 +36,11 @@ in # Xbox wireless protocol support (PDP RiffMaster Xbox, Xbox controllers, etc.) hardware.xone.enable = true; + # Disable USB autosuspend — xone-wired PDP RiffMaster guitars disconnect + # when the kernel suspends the USB device after 2s of idle, then fail to + # wake on button press (connect/disconnect loop in dmesg). + boot.kernelParams = [ "usbcore.autosuspend=-1" ]; + # YARG (rhythm game) needs udev rules for HID controller access. # Without these, instruments (Wii, PS3, etc.) can't be read without # sudo, and Steam's input layer must be used as a workaround (which diff --git a/roles/kodi/default.nix b/roles/kodi/default.nix index 3813268..b2374af 100644 --- a/roles/kodi/default.nix +++ b/roles/kodi/default.nix @@ -22,7 +22,7 @@ in stremioScaleFactor = mkOption { type = types.nullOr types.float; default = null; - description = "Scale factor for Stremio UI via --force-device-scale-factor (e.g., 2 for 200% scaling)"; + description = "Scale factor for Stremio UI via GDK_BACKEND=x11 + GDK_SCALE (e.g., 2.0 for 200% scaling). Forces XWayland mode since GTK4 ignores GDK_SCALE on native Wayland."; }; appLauncherServer = { enable = mkOption { @@ -70,6 +70,22 @@ in } else pkgs.qt-pinned.jellyfin-media-player; + # stremio-linux-shell is a GTK4/libadwaita + WebKitGTK app (not Electron/CEF). + # --force-device-scale-factor is a Chromium flag that it ignores entirely. + # On Wayland, GTK4 reads scale from the compositor via wp_fractional_scale_v1. + # To force a specific scale, we use GDK_BACKEND=x11 + GDK_SCALE which works + # reliably under XWayland. On native Wayland, GDK_SCALE is ignored. + # Format floats cleanly: 2.0 -> "2", 1.5 -> "1.5" + stremioScaleStr = let + sf = cfg.stremioScaleFactor; + intPart = builtins.floor sf; + s = builtins.toString sf; + m = builtins.match "([0-9]+)\\.([0-9]*[1-9])0*" s; + gdkScale = builtins.toString intPart; + in if sf == intPart then builtins.toString intPart + else if m != null then (builtins.elemAt m 0) + "." + (builtins.elemAt m 1) + else s; + stremioPkg = if cfg.stremioScaleFactor != null then pkgs.symlinkJoin { @@ -80,14 +96,15 @@ in mkdir -p $out/bin rm -f $out/bin/stremio makeWrapper ${pkgs.stremio-linux-shell}/bin/stremio $out/bin/stremio \ - --add-flags "--force-device-scale-factor=${toString cfg.stremioScaleFactor}" + --set GDK_BACKEND x11 \ + --set GDK_SCALE ${builtins.toString (builtins.floor cfg.stremioScaleFactor)} - # Update .desktop file to include scale factor + # Update .desktop file to force XWayland + GDK_SCALE for scaling mkdir -p $out/share/applications rm -f $out/share/applications/com.stremio.Stremio.desktop substitute ${pkgs.stremio-linux-shell}/share/applications/com.stremio.Stremio.desktop \ $out/share/applications/com.stremio.Stremio.desktop \ - --replace-fail "Exec=stremio" "Exec=stremio --force-device-scale-factor=${toString cfg.stremioScaleFactor}" + --replace-fail "Exec=sh -c " "Exec=env GDK_BACKEND=x11 GDK_SCALE=${builtins.toString (builtins.floor cfg.stremioScaleFactor)} sh -c " ''; } else pkgs.stremio-linux-shell;