feat(kodi): replace stremio with stremio-linux-shell and add scale factor support
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:
@@ -298,7 +298,7 @@
|
|||||||
"custom-qmd" = pkgs.custom.qmd;
|
"custom-qmd" = pkgs.custom.qmd;
|
||||||
|
|
||||||
"qt-pinned-jellyfin-media-player" = pkgsQt.jellyfin-media-player;
|
"qt-pinned-jellyfin-media-player" = pkgsQt.jellyfin-media-player;
|
||||||
"qt-pinned-stremio" = pkgsQt.stremio;
|
# "qt-pinned-stremio" = pkgsQt.stremio; # Replaced by stremio-linux-shell (Rust/CEF-based)
|
||||||
}
|
}
|
||||||
// (
|
// (
|
||||||
if system == "x86_64-linux" then
|
if system == "x86_64-linux" then
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ with lib;
|
|||||||
wayland = true;
|
wayland = true;
|
||||||
appLauncherServer.enable = true;
|
appLauncherServer.enable = true;
|
||||||
jellyfinScaleFactor = 1.0;
|
jellyfinScaleFactor = 1.0;
|
||||||
|
stremioScaleFactor = 2.0;
|
||||||
};
|
};
|
||||||
nfs-mounts.enable = true;
|
nfs-mounts.enable = true;
|
||||||
users.enable = true;
|
users.enable = true;
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ with lib;
|
|||||||
wayland = true;
|
wayland = true;
|
||||||
appLauncherServer.enable = true;
|
appLauncherServer.enable = true;
|
||||||
jellyfinScaleFactor = 1.0;
|
jellyfinScaleFactor = 1.0;
|
||||||
|
stremioScaleFactor = 2.0;
|
||||||
};
|
};
|
||||||
nfs-mounts.enable = true;
|
nfs-mounts.enable = true;
|
||||||
users.enable = true;
|
users.enable = true;
|
||||||
|
|||||||
+30
-2
@@ -19,6 +19,11 @@ in
|
|||||||
default = null;
|
default = null;
|
||||||
description = "Scale factor for Jellyfin Media Player UI (e.g., 1.5 for 150% scaling)";
|
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 = {
|
appLauncherServer = {
|
||||||
enable = mkOption {
|
enable = mkOption {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
@@ -64,6 +69,28 @@ in
|
|||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
else pkgs.qt-pinned.jellyfin-media-player;
|
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
|
in mkIf cfg.enable
|
||||||
{
|
{
|
||||||
users.extraUsers.kodi = {
|
users.extraUsers.kodi = {
|
||||||
@@ -80,12 +107,13 @@ in
|
|||||||
firefox
|
firefox
|
||||||
jellyfinMediaPlayerPkg
|
jellyfinMediaPlayerPkg
|
||||||
kodiPkg
|
kodiPkg
|
||||||
qt-pinned.stremio
|
stremioPkg
|
||||||
|
# qt-pinned.stremio # Replaced by stremio-linux-shell (Rust/CEF-based)
|
||||||
wget
|
wget
|
||||||
] ++ optional cfg.appLauncherServer.enable pkgs.custom.app-launcher-server;
|
] ++ optional cfg.appLauncherServer.enable pkgs.custom.app-launcher-server;
|
||||||
|
|
||||||
nixpkgs.config.permittedInsecurePackages = lib.warn
|
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"
|
"qtwebengine-5.15.19"
|
||||||
];
|
];
|
||||||
|
|||||||
Reference in New Issue
Block a user