pipewire.conf: add condition for exec and modules

Add a condition to load the session manager and pipewire-pulse. This
makes it possible to disable the exec based on a context.properties
override.

Add a condition to load the access module. This makes it possible to
disable the default access behaviour and override with a custom one.

Fixes #3160
This commit is contained in:
Wim Taymans 2023-04-17 10:32:51 +02:00
parent e8c5c1bb97
commit 27bc60aeab

View file

@ -47,6 +47,9 @@ context.properties = {
# keys checked below to disable module loading # keys checked below to disable module loading
module.x11.bell = true module.x11.bell = true
# enables autoloading of access module, when disabled an alternative
# access module needs to be loaded.
module.access = true
} }
context.spa-libs = { context.spa-libs = {
@ -152,6 +155,7 @@ context.modules = [
# access.force permission. # access.force permission.
#access.force = flatpak #access.force = flatpak
} }
condition = [ { module.access = true } ]
} }
# Makes a factory for wrapping nodes in an adapter with a # Makes a factory for wrapping nodes in an adapter with a
@ -290,12 +294,14 @@ context.exec = [
# but it is better to start it as a systemd service. # but it is better to start it as a systemd service.
# Run the session manager with -h for options. # Run the session manager with -h for options.
# #
@sm_comment@{ path = "@session_manager_path@" args = "@session_manager_args@" } @sm_comment@{ path = "@session_manager_path@" args = "@session_manager_args@"
@sm_comment@ condition = [ { exec.session-manager = null } { exec.session-manager = true } ] }
# #
# You can optionally start the pulseaudio-server here as well # You can optionally start the pulseaudio-server here as well
# but it is better to start it as a systemd service. # but it is better to start it as a systemd service.
# It can be interesting to start another daemon here that listens # It can be interesting to start another daemon here that listens
# on another address with the -a option (eg. -a tcp:4713). # on another address with the -a option (eg. -a tcp:4713).
# #
@pulse_comment@{ path = "@pipewire_path@" args = "-c pipewire-pulse.conf" } @pulse_comment@{ path = "@pipewire_path@" args = "-c pipewire-pulse.conf"
@pulse_comment@ condition = [ { exec.pipewire-pulse = null } { exec.pipewire-pulse = true } ] }
] ]