Subject: Re: [bug#63863] [PATCH v5 1/1] gnu: home: Add support for home-pipewire-service

From: Brian Cully <[email-masked]>
Date: Sat, 16 Dec 2023 10:17:21 -0500

Hilton Chain <[email-masked]> writes:

> I'd prefer the following:
> 
> (define (home-pipewire-asoundrc config)
>  (match-record config <home-pipewire-configuration>
>    (pipewire)
>    (mixed-text-file
>     "asoundrc"
>     "<" pipewire "/share/alsa/alsa.conf.d/50-pipewire.conf>\n"
>     "<" pipewire "/share/alsa/alsa.conf.d/99-pipewire-default.conf>\n"
>     "pcm_type.pipewire {\n"
>     "  lib \"" pipewire "/lib/alsa-lib/libasound_module_pcm_pipewire.so\"\n"
>     "}\n"
>     "ctl_type.pipewire {\n"
>     "  lib \"" pipewire "/lib/alsa-lib/libasound_module_ctl_pipewire.so\"\n"
>     "}\n")))
> 
> 
> or:
> 
> (define (home-pipewire-asoundrc config)
>  (match-record config <home-pipewire-configuration>
>    (pipewire)
>    (mixed-text-file
>     "asoundrc"
>     #~(begin
>         (use-modules (ice-9 format))
>         (format #f "~
> <~a/share/alsa/alsa.conf.d/50-pipewire.conf>
> <~@*~a/share/alsa/alsa.conf.d/99-pipewire-default.conf>
> pcm_type.pipewire {
>  lib \"~@*~a/lib/alsa-lib/libasound_module_pcm_pipewire.so\"
> }
> ctl_type.pipewire {
>  lib \"~@*~a/lib/alsa-lib/libasound_module_ctl_pipewire.so\"
> }~%" #$pipewire)))))

I prefer the former to the latter; I often find ‘format’ strings to be pretty confusing, and the documentation doesn't tend to help much. I know I'm not alone in this, and since this is fairly simple, I'll use the straight concatenation, which has the additional benefit of preserving indentation.

> One thing to note: the wireplumber package is built with elogind integration, so
> it fails to start when elogind is not present:
> 
> [wireplumber] failed to start systemd logind monitor: -2 (No such file or directory)
> 
> I think we can add a wireplumber variant built with "-Delogind=disabled" and
> maybe mention it in the documentation.

Sounds reasonable. I don't know how long wireplumber has been able to be built without systemd stuff, just that I tried running it with seatd/greetd and it failed. Have you got it working without elogind?

I'm not sure when I'll be able to have a look at it, so I'd rather the current patch go in, and we can add elogind-less variants afterwards.

--
-bjc