[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
01/07: services: Add pulseaudio service.
From: |
guix-commits |
Subject: |
01/07: services: Add pulseaudio service. |
Date: |
Wed, 8 Jan 2020 02:24:41 -0500 (EST) |
wigust pushed a commit to branch master
in repository guix.
commit a66ee82a05d8ff1ef7c5ff9ac7723cb32fc4e22a
Author: Oleg Pykhalov <address@hidden>
AuthorDate: Sun Jan 5 20:11:01 2020 +0300
services: Add pulseaudio service.
* gnu/services/sound.scm (pulseaudio-environment): New procedure.
(pulseaudio-service-type): New variable.
* doc/guix.texi (Sound Services): Document it.
---
doc/guix.texi | 14 ++++++++++++++
gnu/services/sound.scm | 28 ++++++++++++++++++++++++++--
2 files changed, 40 insertions(+), 2 deletions(-)
diff --git a/doc/guix.texi b/doc/guix.texi
index df1ba42..bb0ef17 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -15951,6 +15951,20 @@ pcm.!default @{
See @uref{https://www.alsa-project.org/main/index.php/Asoundrc} for the
details.
+@deffn {Scheme Variable} pulseaudio-service-type
+This is the type for the @uref{http://www.pulseaudio.org/, PulseAudio
+sound server}, which sets the @var{LADSPA_PATH} environment variable to
+allow PulseAudio load modules from @code{swh-plugins} package.
+
+See @uref{http://plugin.org.uk/ladspa-swh/docs/ladspa-swh.html} for the
+details.
+
+The following example will setup the service:
+
+@lisp
+(service pulseaudio-service-type)
+@end lisp
+@end deffn
@node Database Services
@subsection Database Services
diff --git a/gnu/services/sound.scm b/gnu/services/sound.scm
index f2dd244..aaca733 100644
--- a/gnu/services/sound.scm
+++ b/gnu/services/sound.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2018 Oleg Pykhalov <address@hidden>
+;;; Copyright © 2018, 2020 Oleg Pykhalov <address@hidden>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -21,16 +21,20 @@
#:use-module (gnu services configuration)
#:use-module (gnu services shepherd)
#:use-module (gnu services)
+ #:use-module (gnu system pam)
#:use-module (gnu system shadow)
#:use-module (guix gexp)
#:use-module (guix packages)
#:use-module (guix records)
#:use-module (guix store)
+ #:use-module (gnu packages audio)
#:use-module (gnu packages linux)
#:use-module (gnu packages pulseaudio)
#:use-module (ice-9 match)
#:export (alsa-configuration
- alsa-service-type))
+ alsa-service-type
+
+ pulseaudio-service-type))
;;; Commentary:
;;;
@@ -97,4 +101,24 @@ ctl.!default {
(default-value (alsa-configuration))
(description "Configure low-level Linux sound support, ALSA.")))
+
+;;;
+;;; PulseAudio
+;;;
+
+(define (pulseaudio-environment config)
+ ;; Define this variable in the global environment such that
+ ;; pulseaudio swh-plugins works.
+ `(("LADSPA_PATH"
+ . ,(file-append swh-plugins "/lib/ladspa"))))
+
+(define pulseaudio-service-type
+ (service-type
+ (name 'pulseaudio)
+ (extensions
+ (list (service-extension session-environment-service-type
+ pulseaudio-environment)))
+ (default-value #f)
+ (description "Configure PulseAudio sound support.")))
+
;;; sound.scm ends here
- branch master updated (9f5cb51 -> 5e5b884), guix-commits, 2020/01/08
- 02/07: gnu: tome4: Update to 1.6.6., guix-commits, 2020/01/08
- 01/07: services: Add pulseaudio service.,
guix-commits <=
- 03/07: gnu: inxi-minimal: Update to 3.0.37-1., guix-commits, 2020/01/08
- 04/07: gnu: neofetch: Update to 6.1.0-1.501d6b7., guix-commits, 2020/01/08
- 07/07: gnu: keepalived: Update to 2.0.19., guix-commits, 2020/01/08
- 05/07: gnu: iperf: Update to 3.7., guix-commits, 2020/01/08
- 06/07: gnu: irssi: Update to 1.2.2., guix-commits, 2020/01/08