summary refs log tree commit diff
path: root/doc/guix.texi
diff options
context:
space:
mode:
authorMaxim Cournoyer <maxim.cournoyer@gmail.com>2022-01-31 14:17:51 -0500
committerMaxim Cournoyer <maxim.cournoyer@gmail.com>2022-02-26 09:03:01 -0500
commit60cb647a2807c4ff1ec3eeae589bb985fe7bde28 (patch)
treef5415123be5f0811e2be3084d8acfcac8f277d34 /doc/guix.texi
parent1cc9060ca3db1fadcf0f2c8118529a721288f693 (diff)
downloadguix-60cb647a2807c4ff1ec3eeae589bb985fe7bde28.tar.gz
services: pulseaudio: Add an extra-script-files configuration field.
* gnu/services/sound.scm (<pulseaudio-configuration>)
[extra-script-files]: Add field.
(extra-script-files->file-union): New procedure.
(append-include-directive): Likewise.
(pulseaudio-etc): Use them.
* doc/guix.texi: Document the new 'extra-script-files- configuration field.
Diffstat (limited to 'doc/guix.texi')
-rw-r--r--doc/guix.texi35
1 files changed, 34 insertions, 1 deletions
diff --git a/doc/guix.texi b/doc/guix.texi
index 05c260d792..a6437729ff 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -21511,11 +21511,44 @@ List of settings to set in @file{daemon.conf}, formatted just like
 @var{client-conf}.
 
 @item @code{script-file} (default: @code{(file-append pulseaudio "/etc/pulse/default.pa")})
-Script file to use as @file{default.pa}.
+Script file to use as @file{default.pa}.  In case the
+@code{extra-script-files} field below is used, an @code{.include}
+directive pointing to @file{/etc/pulse/default.pa.d} is appended to the
+provided script.
+
+@item @code{extra-script-files} (default: @code{'())})
+A list of file-like objects defining extra PulseAudio scripts to run at
+the initialization of the @command{pulseaudio} daemon, after the main
+@code{script-file}.  The scripts are deployed to the
+@file{/etc/pulse/default.pa.d} directory; they should have the
+@samp{.pa} file name extension.  For a reference of the available
+commands, refer to @command{man pulse-cli-syntax}.
 
 @item @code{system-script-file} (default: @code{(file-append pulseaudio "/etc/pulse/system.pa")})
 Script file to use as @file{system.pa}.
 @end table
+
+The example below sets the default PulseAudio card profile, the default
+sink and the default source to use for a old SoundBlaster Audigy sound
+card:
+@lisp
+(pulseaudio-configuration
+ (extra-script-files
+  (list (plain-file "audigy.pa"
+                    (string-append "\
+set-card-profile alsa_card.pci-0000_01_01.0 \
+  output:analog-surround-40+input:analog-mono
+set-default-source alsa_input.pci-0000_01_01.0.analog-mono
+set-default-sink alsa_output.pci-0000_01_01.0.analog-surround-40\n")))))
+@end lisp
+
+Note that @code{pulseaudio-service-type} is part of
+@code{%desktop-services}; if your operating system declaration was
+derived from one of the desktop templates, you'll want to adjust the
+above example to modify the existing @code{pulseaudio-service-type} via
+@code{modify-services} (@pxref{Service Reference,
+@code{modify-services}}), instead of defining a new one.
+
 @end deftp
 
 @deffn {Scheme Variable} ladspa-service-type