summaryrefslogtreecommitdiff
path: root/gnu/home
diff options
context:
space:
mode:
authorJanneke Nieuwenhuizen <[email protected]>2024-12-02 21:55:48 +0100
committerJanneke Nieuwenhuizen <[email protected]>2025-01-22 09:32:18 +0100
commit7080aaf08102ec4c9c976582d6adfa0c14e6c640 (patch)
treec138944b0957b7f659d69da1817a8c620cf605b6 /gnu/home
parent9525164b38c2620bb2ac1052609a09c184a9a7fb (diff)
gnu: home: home-pipewire: Add extra-content to configuration.
This allows for setting the default sound card/device, e.g.: pcm.!default {type hw card 0 device 2} ctl.!default {type hw card 0 device 2} * gnu/home/services/sound.scm (home-pipewire-configuration)[extra-content]: New field. * gnu/home/services/sound.scm (home-pipewire-asoundrc): Append it to "asoundrc". * doc/guix.texi (Sound Home Services): Update accordingly. Change-Id: I6ecebaaab41cd7313b16a5f365c21789db65664e
Diffstat (limited to 'gnu/home')
-rw-r--r--gnu/home/services/sound.scm11
1 files changed, 8 insertions, 3 deletions
diff --git a/gnu/home/services/sound.scm b/gnu/home/services/sound.scm
index 313a57305b..5366c0634f 100644
--- a/gnu/home/services/sound.scm
+++ b/gnu/home/services/sound.scm
@@ -1,6 +1,7 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2023 Ludovic Courtès <[email protected]>
;;; Copyright © 2023 Brian Cully <[email protected]>
+;;; Copyright © 2024 Janneke Nieuwenhuizen <[email protected]>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -49,7 +50,10 @@
(enable-pulseaudio?
(boolean #t)
"When true, enable PipeWire's PulseAudio emulation support, allowing
-PulseAudio clients to use PipeWire transparently."))
+PulseAudio clients to use PipeWire transparently.")
+ (extra-content
+ (string "")
+ "Extra content to add to the end of @file{~/.config/alsa/asoundrc}."))
(define (home-pipewire-shepherd-service config)
(shepherd-service
@@ -93,7 +97,7 @@ PulseAudio clients to use PipeWire transparently."))
(define (home-pipewire-asoundrc config)
(match-record config <home-pipewire-configuration>
- (pipewire)
+ (pipewire extra-content)
(mixed-text-file
"asoundrc"
"<" pipewire "/share/alsa/alsa.conf.d/50-pipewire.conf>\n"
@@ -103,7 +107,8 @@ PulseAudio clients to use PipeWire transparently."))
"}\n"
"ctl_type.pipewire {\n"
" lib \"" pipewire "/lib/alsa-lib/libasound_module_ctl_pipewire.so\"\n"
- "}\n")))
+ "}\n"
+ extra-content)))
(define home-pipewire-disable-pulseaudio-auto-start
(plain-file "client.conf" "autospawn = no"))