Subject: [bug#53676] [PATCH 3/5] gnu: pulseaudio: Graft to adjust configuration.

From: Liliana Marie Prikler <[email-masked]>
Date: Wed, 02 Feb 2022 21:43:14 +0100

Hi,

Am Dienstag, dem 01.02.2022 um 23:30 -0500 schrieb Maxim Cournoyer:
> If someone was to append something to default.pa (the exact one shipped
> with PulseAudio), they'd have to add the .fail themselves to undo
> PulseAudio's own .nofail, right?  I don't see why we should go out of
> our way to change that.
Didn't you add that .nofail on your own?  If not, why include the
directive?

> With the proposed 'extra-script-files', I'd argue that appending
> something to default.pa should be considered an anti-pattern; as the
> new field would be the more natural option to *extend* 'default.pa'
> (and having a field to override default.pa is still useful if you don't
> like any of the default behavior).
I don't think you're making a good case here.  Why do you want
appending to default.pa to be an anti-pattern?

> > Can you define "simplicity" here?  In my opinion, services/stuff.scm
> > or
> > /etc/config.scm provide an easier point of change/extension than
> > packages do -- particularly also because pulseaudio-service-type
> > (even with this patch set) does not allow changing the pulseaudio
> > package.
> 
> The default behavior of default.pa is to allow loading extra files from
> 'pulsesysconfdir', which in our case corresponds to output/etc
> of pulseaudio; e.g.:
> 
> --8<---------------cut here---------------start------------->8---
> ### Allow including a default.pa.d directory, which if present, can be
> used
> ### for additional configuration snippets.
> .nofail
> .include /gnu/store/7xwgz4bavb1i8sfx1lm55hlrr3ngjkdx-pulseaudio-
> 15.0/etc/pulse/default.pa.d
> --8<---------------cut here---------------end--------------->8---
> 
> That's not very useful, but is preserved in case pulseaudio ever
> decides to drop their own scripts in there.  Adjusting this path is
> more natural and straightforwardly done from the package description
> than from the service, in my opinion.
Well, by Hyrum's Law we can be sure that someone inherited pulseaudio
to put files into pulsesysconfdir.  That aside, I think substitute*
would be expressing your intent better here, because what you actually
want is to match that line and then append an .include
/etc/pulse/default.pa.d hardcoded.

I still don't agree that that's a good idea, however.  Particularly, it
would lead to including files from an "old distro" that was infected
with Guix when that probably wasn't asked for.  If at all enabled, I'd
prefer if pulseaudio-service-type magically inserted that snippet for
configurations that add files to default.pa.d.

Note also that default.pa.d has no history [1] in traditional distros,
so it's a feature that likely won't be missed by anyone, at least not
out of nostalgia.  In addition, I'd be careful with claims towards our
intent of including this snippet at all.  As far as I know, it simply
wasn't removed, which might just as well mean that it didn't break the
build for anyone.

Cheers

[1]
https://cgit.freedesktop.org/pulseaudio/pulseaudio/tree/src/daemon/default.pa.in?h=v14.2#n175