Files
nix-config/hardening/tests/policy/mpv.nix
T
Ryan Yin 8c2f84404c fix(nixpak): let mpv read the musicfox playback cache
Assisted-by: DeepSeek Harness (deepseek-flash)
2026-11-06 16:19:14 +08:00

24 lines
501 B
Nix

{
load,
mkAppPolicy,
renderBind,
...
}:
let
app = load "mpv";
in
mkAppPolicy "mpv" {
network = "pasta";
media = false;
pulse = true;
x11 = false;
mpris = true;
notifications = false;
extraChecks = {
fileChooser = app.portalGroups.fileChooser;
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);
};
}