packages/amberol: factor out mpris2-player module, tighten dbus permissions

This commit is contained in:
Max Headroom 2023-05-02 23:50:40 +02:00
parent af2ffc6fa0
commit 40aae03414
2 changed files with 10 additions and 4 deletions

View file

@ -2,10 +2,10 @@
mkNixPak { mkNixPak {
config = { sloth, ... }: { config = { sloth, ... }: {
imports = [ ../modules/gui-base.nix ]; imports = [
dbus.policies = { ../modules/gui-base.nix
"org.mpris.MediaPlayer2.*" = "own"; ../modules/mpris2-player.nix
}; ];
flatpak.appId = "io.bassi.Amberol"; flatpak.appId = "io.bassi.Amberol";
bubblewrap = { bubblewrap = {
bind.rw = [ bind.rw = [

View file

@ -0,0 +1,6 @@
{ config, ... }:
{
dbus.policies = {
"org.mpris.MediaPlayer2.${config.flatpak.appId}" = "own";
};
}