Next: , Previous: , Up: Services   [Contents][Index]

8.8.8 Sound Services

The (gnu services sound) module provides a service to configure the Advanced Linux Sound Architecture (ALSA) system, which makes PulseAudio the preferred ALSA output driver.

Scheme Variable: alsa-service-type

This is the type for the Advanced Linux Sound Architecture (ALSA) system, which generates the /etc/asound.conf configuration file. The value for this type is a alsa-configuration record as in this example:

(service alsa-service-type)

See below for details about alsa-configuration.

Data Type: alsa-configuration

Data type representing the configuration for alsa-service.

alsa-plugins (default: alsa-plugins)

alsa-plugins package to use.

pulseaudio? (default: #t)

Whether ALSA applications should transparently be made to use the PulseAudio sound server.

Using PulseAudio allows you to run several sound-producing applications at the same time and to individual control them via pavucontrol, among other things.

extra-options (default: "")

String to append to the /etc/asound.conf file.

Individual users who want to override the system configuration of ALSA can do it with the ~/.asoundrc file:

# In guix, we have to specify the absolute path for plugins.
pcm_type.jack {
  lib "/home/alice/.guix-profile/lib/alsa-lib/"

# Routing ALSA to jack:
# <>.
pcm.rawjack {
  type jack
  playback_ports {
    0 system:playback_1
    1 system:playback_2

  capture_ports {
    0 system:capture_1
    1 system:capture_2

pcm.!default {
  type plug
  slave {
    pcm "rawjack"

See for the details.