Subject: [PATCH] services: pulseaudio: Fix /etc/pulse/default.pa not being used.

From: Maxim Cournoyer <[email-masked]>
Date: Wed, 28 Dec 2022 14:38:28 -0500

Fixes <https://issues.guix.gnu.org/60383>.

* gnu/services/sound.scm (pulseaudio-etc): Produce daemon.conf
unconditionally, with the correct default-script-file location.  Produce
client.conf unconditionally.

Reported-by: Bruno Victal <[email-masked]>
---

 gnu/services/sound.scm | 18 +++++++-----------
 1 file changed, 7 insertions(+), 11 deletions(-)

diff --git a/gnu/services/sound.scm b/gnu/services/sound.scm
index 8410ba2418..3e778f3cea 100644
--- a/gnu/services/sound.scm
+++ b/gnu/services/sound.scm
@@ -204,17 +204,13 @@ (define pulseaudio-etc
                   '()
                   `(("default.pa.d" ,(extra-script-files->file-union
                                       extra-script-files))))
-            ,@(if (null? daemon-conf)
-                  '()
-                  `(("daemon.conf"
-                     ,(apply mixed-text-file "daemon.conf"
-                             "default-script-file = " default-script-file "\n"
-                             (map pulseaudio-conf-entry daemon-conf)))))
-            ,@(if (null? client-conf)
-                  '()
-                  `(("client.conf"
-                     ,(apply mixed-text-file "client.conf"
-                             (map pulseaudio-conf-entry client-conf))))))))))))
+            ("daemon.conf"
+             ,(apply mixed-text-file "daemon.conf"
+                     "default-script-file = /etc/pulse/default.pa\n"
+                     (map pulseaudio-conf-entry daemon-conf)))
+            ("client.conf"
+             ,(apply mixed-text-file "client.conf"
+                     (map pulseaudio-conf-entry client-conf))))))))))
 
 (define pulseaudio-service-type
   (service-type

base-commit: bbada5967d791776c7f6a81e272a0e6a67d216bb
-- 
2.38.1