mirror of
https://github.com/lhns/steam-frame-nix.git
synced 2026-10-06 06:00:22 +02:00
Defaults: firefox.disableAv1 on, Jellyfin hardware decoding on when nix-flatpak installs it
This commit is contained in:
1 parent
4320a69b89
commit
1135f8c51f
4 files changed
+47
-26
No files matched your search
+17
-8
@@ -28,7 +28,9 @@ let
|
||||
ffDir = "$HOME/.var/app/org.mozilla.firefox/config/mozilla/firefox";
|
||||
profileDir = "${ffDir}/${cfg.desktopProfile}";
|
||||
|
||||
defaultPrefs = cfg.prefs // lib.optionalAttrs cfg.vrFullscreenFix { "full-screen-api.ignore-widgets" = true; };
|
||||
defaultPrefs = lib.optionalAttrs cfg.disableAv1 { "media.av1.enabled" = false; }
|
||||
// lib.optionalAttrs cfg.vrFullscreenFix { "full-screen-api.ignore-widgets" = true; }
|
||||
// cfg.prefs;
|
||||
desktopFix = cfg.enable && cfg.vrFullscreenFix && cfg.desktopProfile != null;
|
||||
# Only ever this one pref (profileSync relies on it).
|
||||
desktopKeys = [ "full-screen-api.ignore-widgets" ];
|
||||
@@ -130,17 +132,24 @@ in {
|
||||
Steam session.
|
||||
'';
|
||||
};
|
||||
disableAv1 = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = true;
|
||||
description = ''
|
||||
Default media.av1.enabled to false: the Frame's decoder driver has no
|
||||
AV1 (H.264, HEVC, VP9 only), so sites like YouTube send VP9/H.264,
|
||||
decoded in hardware, instead of software-decoded AV1.
|
||||
'';
|
||||
};
|
||||
prefs = lib.mkOption {
|
||||
type = with lib.types; attrsOf (oneOf [ bool int str ]);
|
||||
default = { };
|
||||
example = { "media.av1.enabled" = false; };
|
||||
example = { "media.autoplay.default" = 5; };
|
||||
description = ''
|
||||
about:config preferences for every profile (desktop one included),
|
||||
as default values: about:config can still change them for a profile,
|
||||
and removing one here leaves nothing behind. E.g. media.av1.enabled =
|
||||
false: the Frame's decoder has no AV1, so sites like YouTube fall back
|
||||
to VP9/H.264, which it decodes in hardware. Take effect at the next
|
||||
start of Firefox.
|
||||
Further about:config preferences for every profile (desktop one
|
||||
included), as default values: about:config can still change them for
|
||||
a profile, and removing one here leaves nothing behind. Override the
|
||||
fixes above too. Take effect at the next start of Firefox.
|
||||
'';
|
||||
};
|
||||
desktopProfile = lib.mkOption {
|
||||
|
||||
+13
-6
@@ -32,12 +32,19 @@ let
|
||||
override));
|
||||
in {
|
||||
options.steamFrame.jellyfin.hardwareDecoding = {
|
||||
enable = lib.mkEnableOption ''
|
||||
hardware video decoding (the Frame's V4L2 decoder) in the Jellyfin
|
||||
Desktop Flatpak: device access for the sandbox (devices=all) and an
|
||||
LD_PRELOAD shim that makes mpv try hwdec's value below. Without
|
||||
nix-flatpak, home-manager owns the app's Flatpak override file. Takes
|
||||
effect at the next start of Jellyfin'';
|
||||
enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = lib.any (p: (if builtins.isString p then p else p.appId or null) == app)
|
||||
(config.services.flatpak.packages or [ ]);
|
||||
defaultText = lib.literalMD "`true` if nix-flatpak installs `org.jellyfin.JellyfinDesktop` (`services.flatpak.packages`), else `false`";
|
||||
description = ''
|
||||
Hardware video decoding (the Frame's V4L2 decoder) in the Jellyfin
|
||||
Desktop Flatpak: device access for the sandbox (devices=all) and an
|
||||
LD_PRELOAD shim that makes mpv try hwdec's value below. Without
|
||||
nix-flatpak, home-manager owns the app's Flatpak override file. Takes
|
||||
effect at the next start of Jellyfin.
|
||||
'';
|
||||
};
|
||||
hwdec = lib.mkOption {
|
||||
type = lib.types.strMatching "[^[:space:]]+";
|
||||
default = "v4l2m2m-copy,auto-copy";
|
||||
|
||||
Reference in new issue
Block a user