Allow multiple calls to dbus combinator

Before this change, additional calls to the dbus combinator would add
multiple `xdg-dbus-proxy` instances, but only the latest call would be
forwarded into the jail.

With this change, all permissions are saved in state, then, in a
deferred `add-runtime` we add a single `xdg-dbus-proxy` exposing the
union of all previous dbus calls.

This should allow writing combinators that expose dbus permissions like
notifications, or reading light/dark mode changes which can be composed
just like the other non-dbus combinators.
This commit is contained in:
Alex David 2025-09-28 15:44:36 -07:00
commit 3610987241
3 changed files with 113 additions and 37 deletions

View file

@ -43,6 +43,7 @@ let
cleanup = [ ]; # See cleanup combinator
deferredPermissions = [ ]; # See defer combinator
additionalRuntimeClosures = [ ]; # See bind-nix-store-runtime-closure
dbusPermissions = [ ]; # See dbus combinator
};
in
lib.pipe initialState (