feat(kodi): replace stremio with stremio-linux-shell and add scale factor support
CI / check (push) Successful in 12m31s
CI / build-and-cache (push) Failing after 7m29s
CI / Build & Push OpenClaw Image (push) Successful in 41m26s

Migrate from Qt-based stremio to Rust/CEF-based stremio-linux-shell.
Add stremioScaleFactor option (uses --force-device-scale-factor) for
4K TV display scaling. Set to 2.0 on boxy and gym-box.
This commit is contained in:
2026-05-11 19:47:18 -07:00
parent 1bf7b88be5
commit 398c5fcc8a
4 changed files with 33 additions and 3 deletions
+30 -2
View File
@@ -19,6 +19,11 @@ in
default = null;
description = "Scale factor for Jellyfin Media Player UI (e.g., 1.5 for 150% scaling)";
};
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)";
};
appLauncherServer = {
enable = mkOption {
type = types.bool;
@@ -64,6 +69,28 @@ in
'';
}
else pkgs.qt-pinned.jellyfin-media-player;
stremioPkg =
if cfg.stremioScaleFactor != null
then pkgs.symlinkJoin {
name = "stremio-scaled";
paths = [ pkgs.stremio-linux-shell ];
nativeBuildInputs = [ pkgs.makeWrapper ];
postBuild = ''
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}"
# Update .desktop file to include scale factor
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}"
'';
}
else pkgs.stremio-linux-shell;
in mkIf cfg.enable
{
users.extraUsers.kodi = {
@@ -80,12 +107,13 @@ in
firefox
jellyfinMediaPlayerPkg
kodiPkg
qt-pinned.stremio
stremioPkg
# qt-pinned.stremio # Replaced by stremio-linux-shell (Rust/CEF-based)
wget
] ++ optional cfg.appLauncherServer.enable pkgs.custom.app-launcher-server;
nixpkgs.config.permittedInsecurePackages = lib.warn
"Allowing insecure package qtwebengine-5.15.19 as a jellyfin-media-player/stremio dependency. These are pinned to nixpkgs-qt to avoid rebuilds - update that input separately when you have time."
"Allowing insecure package qtwebengine-5.15.19 as a jellyfin-media-player dependency. These are pinned to nixpkgs-qt to avoid rebuilds - update that input separately when you have time."
[
"qtwebengine-5.15.19"
];