diff options
author | Oleg Pykhalov <go.wigust@gmail.com> | 2020-01-05 20:11:01 +0300 |
---|---|---|
committer | Oleg Pykhalov <go.wigust@gmail.com> | 2020-01-08 10:21:45 +0300 |
commit | a66ee82a05d8ff1ef7c5ff9ac7723cb32fc4e22a (patch) | |
tree | ea8720cdbd6aa6d7a24039004f621217873ec6a7 /gnu | |
parent | 9f5cb517d09eb6136c21bb8bbe097951a1af85d5 (diff) | |
download | guix-a66ee82a05d8ff1ef7c5ff9ac7723cb32fc4e22a.tar.gz |
services: Add pulseaudio service.
* gnu/services/sound.scm (pulseaudio-environment): New procedure. (pulseaudio-service-type): New variable. * doc/guix.texi (Sound Services): Document it.
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/services/sound.scm | 28 |
1 files changed, 26 insertions, 2 deletions
diff --git a/gnu/services/sound.scm b/gnu/services/sound.scm index f2dd24402f..aaca733729 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 <go.wigust@gmail.com> +;;; Copyright © 2018, 2020 Oleg Pykhalov <go.wigust@gmail.com> ;;; ;;; 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 |