MyNixOS website logo
option

hardware.alsa.config

The content of the system-wide ALSA configuration (/etc/asound.conf).

Documentation of the configuration language and examples can be found in the unofficial ALSA wiki: https://alsa.opensrc.org/Asoundrc.

Declarations
Type
strings concatenated with "\n"
Default
""
Example
# Send audio to a remote host via SSH
pcm.remote {
  @args [ HOSTNAME ]
  @args.HOSTNAME { type string }
  type file
  format raw
  slave.pcm pcm.null
  file {
    @func concat
    strings [
      "| ${lib.getExec pkgs.openssh} -C "
      $HOSTNAME
      " aplay -f %f -c %c -r %r -"
    ]
  }
}