Subject: Re: bug#53676: [PATCH 0/5] *** PulseAudio service improvements ***

From: Maxim Cournoyer <[email-masked]>
Date: Thu, 24 Feb 2022 11:31:23 -0500

Hi Liliana,

Liliana Marie Prikler <[email-masked]> writes:

[...]

> The way I wrote above is the way I intended pulseaudio- service-type
> to be used and it's in terms of writing the pulseaudio configuration
> not that much harder than what you are proposing.  It'd be trivial to
> add a clause to ".include /etc/pulse/default.pa.d" through the service
> configuration layer.  Also with pulseaudio < 15.0, you could – after
> groking gexps a little – produce
>
> .include /gnu/store/7xwgz4bavb1i8sfx1lm55hlrr3ngjkdx-pulseaudio-
> 15.0/etc/default.pa
> .include /gnu/store/12345678901234567890123456789012-audigy-card.pa
> .include /gnu/store/12345678901234567890123456789013-other-stuff.pa
> [...]
>
>
> inside that mixed-text-file.  With pulseaudio 15.0, you can also
>
> (define my-pulseaudio-extra-config
>   (directory-union ...))
>
> and use it like
>
> (script-file
>   (mixed-text-file "default.pa"
>                    ".include"
>                    (file-append pulseaudio "/etc/default.pa")
>                    ".include" my-pulseaudio-extra-config))

That is nice, but is still a bit more demanding from users:

1. They need to know how to compose multiple G-Exps expressions such as
mixed-text-file and file-append.
2. They need to know to use ".include" directives from PulseAudio.

My proposed change reduces the knowledge needed to just a single usage
of a G-Exp file-like object, such as plain-file or local-file; I think
that's a bit easier to grok for starters.  The resulting configuration
is also easy to inspect; it's all under /etc/pulse as the user would
expect.

Thanks,

Maxim