From 40aae03414f53fc355ccf94a929a00a8c5d44599 Mon Sep 17 00:00:00 2001 From: Max Date: Tue, 2 May 2023 23:50:40 +0200 Subject: [PATCH] packages/amberol: factor out mpris2-player module, tighten dbus permissions --- packages/nixpak/amberol/default.nix | 8 ++++---- packages/nixpak/modules/mpris2-player.nix | 6 ++++++ 2 files changed, 10 insertions(+), 4 deletions(-) create mode 100644 packages/nixpak/modules/mpris2-player.nix diff --git a/packages/nixpak/amberol/default.nix b/packages/nixpak/amberol/default.nix index 1523353..3810c52 100644 --- a/packages/nixpak/amberol/default.nix +++ b/packages/nixpak/amberol/default.nix @@ -2,10 +2,10 @@ mkNixPak { config = { sloth, ... }: { - imports = [ ../modules/gui-base.nix ]; - dbus.policies = { - "org.mpris.MediaPlayer2.*" = "own"; - }; + imports = [ + ../modules/gui-base.nix + ../modules/mpris2-player.nix + ]; flatpak.appId = "io.bassi.Amberol"; bubblewrap = { bind.rw = [ diff --git a/packages/nixpak/modules/mpris2-player.nix b/packages/nixpak/modules/mpris2-player.nix new file mode 100644 index 0000000..683df96 --- /dev/null +++ b/packages/nixpak/modules/mpris2-player.nix @@ -0,0 +1,6 @@ +{ config, ... }: +{ + dbus.policies = { + "org.mpris.MediaPlayer2.${config.flatpak.appId}" = "own"; + }; +}