fix(nixpak): let mpv read the musicfox playback cache

Assisted-by: DeepSeek Harness (deepseek-flash)
This commit is contained in:
Ryan Yin committed 2026-11-06 16:19:14 +08:00
1 parent b726c28c14
commit 8c2f84404c
2 files changed
+7

No files matched your search

+4
View File
@@ -32,6 +32,10 @@
sloth.xdgPicturesDir sloth.xdgPicturesDir
sloth.xdgVideosDir sloth.xdgVideosDir
(sloth.concat' sloth.homeDir "/.config/yt-dlp") (sloth.concat' sloth.homeDir "/.config/yt-dlp")
# go-musicfox hands cached songs to mpv as file:// paths. Nixpak's flatpak
# shim mounts the app's ~/.var/app cache over ~/.cache, so without this
# bind every replay fails to load while the first (streamed) play works.
(sloth.concat' sloth.homeDir "/.cache/go-musicfox")
]; ];
}; };
} }
+3
View File
@@ -1,6 +1,7 @@
{ {
load, load,
mkAppPolicy, mkAppPolicy,
renderBind,
... ...
}: }:
let let
@@ -16,5 +17,7 @@ mkAppPolicy "mpv" {
extraChecks = { extraChecks = {
fileChooser = app.portalGroups.fileChooser; fileChooser = app.portalGroups.fileChooser;
openUri = app.portalGroups.openUri; openUri = app.portalGroups.openUri;
# The flatpak shim hides ~/.cache, so the musicfox cache must be bound back.
musicfoxCache = builtins.elem "$HOME/.cache/go-musicfox" (map renderBind app.bubblewrap.bind.ro);
}; };
} }