Skip to content

Pipewire

services.pipewire.alsa.enable

Whether to enable ALSA support. Type: boolean

Default

false

Example

true

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/desktops/pipewire/pipewire.nix

services.pipewire.alsa.support32Bit

Whether to enable 32-bit ALSA support on 64-bit systems. Type: boolean

Default

false

Example

true

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/desktops/pipewire/pipewire.nix

services.pipewire.audio.enable

Whether to use PipeWire as the primary sound server Type: boolean

Default

config.services.pipewire.alsa.enable || config.services.pipewire.jack.enable || config.services.pipewire.pulse.enable

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/desktops/pipewire/pipewire.nix

services.pipewire.configPackages

List of packages that provide PipeWire configuration, in the form of share/pipewire/*/*.conf files.

LV2 dependencies will be picked up from config packages automatically via passthru.requiredLv2Packages.

Type: list of package

Default

[ ]

Example

[(pkgs.writeTextDir "share/pipewire/pipewire.conf.d/10-loopback.conf" '' context.modules = [ { name = libpipewire-module-loopback args = { node.description = "Scarlett Focusrite Line 1" capture.props = { audio.position = [ FL ] stream.dont-remix = true node.target = "alsa_input.usb-Focusrite_Scarlett_Solo_USB_Y7ZD17C24495BC-00.analog-stereo" node.passive = true } playback.props = { node.name = "SF_mono_in_1" media.class = "Audio/Source" audio.position = [ MONO ] } } } ] '')]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/desktops/pipewire/pipewire.nix

services.pipewire.enable

Whether to enable PipeWire service. Type: boolean

Default

false

Example

true

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/desktops/pipewire/pipewire.nix

services.pipewire.extraConfig.client

Additional configuration for the PipeWire client library, used by most applications.

Every item in this attrset becomes a separate drop-in file in /etc/pipewire/client.conf.d.

See the PipeWire wiki for examples.

Type: attribute set of (JSON value)

Default

{ }

Example

{"10-no-resample" = {"stream.properties" = {"resample.disable" = true;};};}

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/desktops/pipewire/pipewire.nix

services.pipewire.extraConfig.client-rt

Additional configuration for the PipeWire client library, used by real-time applications and legacy ALSA clients.

Every item in this attrset becomes a separate drop-in file in /etc/pipewire/client-rt.conf.d.

See the PipeWire wiki for examples of general configuration, and PipeWire wiki - ALSA for ALSA clients.

Type: attribute set of (JSON value)

Default

{ }

Example

{"10-alsa-linear-volume" = {"alsa.properties" = {"alsa.volume-method" = "linear";};};}

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/desktops/pipewire/pipewire.nix

services.pipewire.extraConfig.jack

Additional configuration for the PipeWire JACK server and client library.

Every item in this attrset becomes a separate drop-in file in /etc/pipewire/jack.conf.d.

See the PipeWire wiki for examples.

Type: attribute set of (JSON value)

Default

{ }

Example

{"20-hide-midi" = {"jack.properties" = {"jack.show-midi" = false;};};}

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/desktops/pipewire/pipewire.nix

services.pipewire.extraConfig.pipewire

Additional configuration for the PipeWire server.

Every item in this attrset becomes a separate drop-in file in /etc/pipewire/pipewire.conf.d.

See man pipewire.conf for details, and the PipeWire wiki for examples.

See also: - PipeWire wiki - virtual devices for creating virtual devices or remapping channels - PipeWire wiki - filter-chain for creating more complex processing pipelines - PipeWire wiki - network for streaming audio over a network

Type: attribute set of (JSON value)

Default

{ }

Example

{"10-clock-rate" = {"context.properties" = {"default.clock.rate" = 44100;};};"11-no-upmixing" = {"stream.properties" = {"channelmix.upmix" = false;};};}

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/desktops/pipewire/pipewire.nix

services.pipewire.extraConfig.pipewire-pulse

Additional configuration for the PipeWire PulseAudio server.

Every item in this attrset becomes a separate drop-in file in /etc/pipewire/pipewire-pulse.conf.d.

See man pipewire-pulse.conf for details, and the PipeWire wiki for examples.

See also: - PipeWire wiki - PulseAudio tricks guide for more examples.

Type: attribute set of (JSON value)

Default

{ }

Example

{"15-force-s16-info" = {"pulse.rules" = [{actions = {quirks = ["force-s16-info"];};matches = [{"application.process.binary" = "my-broken-app";}];}];};}

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/desktops/pipewire/pipewire.nix

services.pipewire.extraLv2Packages

List of packages that provide LV2 plugins in lib/lv2 that should be made available to PipeWire for filter chains.

Config packages have their required LV2 plugins added automatically, so they don't need to be specified here. Config packages need to set passthru.requiredLv2Packages for this to work.

Type: list of package

Default

[ ]

Example

[ pkgs.lsp-plugins ]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/desktops/pipewire/pipewire.nix

services.pipewire.jack.enable

Whether to enable JACK audio emulation. Type: boolean

Default

false

Example

true

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/desktops/pipewire/pipewire.nix

services.pipewire.package

The pipewire package to use. Type: package

Default

pkgs.pipewire

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/desktops/pipewire/pipewire.nix

services.pipewire.pulse.enable

Whether to enable PulseAudio server emulation. Type: boolean

Default

false

Example

true

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/desktops/pipewire/pipewire.nix

services.pipewire.raopOpenFirewall

Opens UDP/6001-6002, required by RAOP/Airplay for timing and control data.

Type: boolean

Default

false

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/desktops/pipewire/pipewire.nix

services.pipewire.socketActivation

Automatically run PipeWire when connections are made to the PipeWire socket.

Type: boolean

Default

true

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/desktops/pipewire/pipewire.nix

services.pipewire.systemWide

If true, a system-wide PipeWire service and socket is enabled allowing all users in the "pipewire" group to use it simultaneously. If false, then user units are used instead, restricting access to only one user.

Enabling system-wide PipeWire is however not recommended and disabled by default according to https://github.com/PipeWire/pipewire/blob/master/NEWS

Type: boolean

Default

false

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/desktops/pipewire/pipewire.nix

services.pipewire.wireplumber.configPackages

List of packages that provide WirePlumber configuration, in the form of share/wireplumber/*/*.conf files.

LV2 dependencies will be picked up from config packages automatically via passthru.requiredLv2Packages.

Type: list of package

Default

[ ]

Example

[(pkgs.writeTextDir "share/wireplumber/wireplumber.conf.d/10-bluez.conf" '' monitor.bluez.properties = { bluez5.roles = [ a2dp_sink a2dp_source bap_sink bap_source hsp_hs hsp_ag hfp_hf hfp_ag ] bluez5.codecs = [ sbc sbc_xq aac ] bluez5.enable-sbc-xq = true bluez5.hfphsp-backend = "native" } '')]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/desktops/pipewire/wireplumber.nix

services.pipewire.wireplumber.enable

Whether to enable WirePlumber, a modular session / policy manager for PipeWire Type: boolean

Default

config.services.pipewire.enable

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/desktops/pipewire/wireplumber.nix

services.pipewire.wireplumber.extraConfig

Additional configuration for the WirePlumber daemon when run in single-instance mode (the default in nixpkgs and currently the only supported way to run WirePlumber configured via extraConfig).

See also: - The configuration file - Modifying configuration - Locations of files - and the configuration section of the docs in general

Note that WirePlumber (and PipeWire) use dotted attribute names like device.product.id. These are not nested, but flat objects for WirePlumber/PipeWire, so to write these in nix expressions, remember to quote them like "device.product.id". Have a look at the example for this.

Type: attribute set of attribute set of (JSON value)

Default

{ }

Example

{"log-level-debug" = {"context.properties" = {# Output Debug log messages as opposed to only the default level (Notice)"log.level" = "D";};};"wh-1000xm3-ldac-hq" = {"monitor.bluez.rules" = [{matches = [{# Match any bluetooth device with ids equal to that of a WH-1000XM3"device.name" = "~bluez_card.*";"device.product.id" = "0x0cd3";"device.vendor.id" = "usb:054c";}];actions = {update-props = {# Set quality to high quality instead of the default of auto"bluez5.a2dp.ldac.quality" = "hq";};};}];};}

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/desktops/pipewire/wireplumber.nix

services.pipewire.wireplumber.extraLv2Packages

List of packages that provide LV2 plugins in lib/lv2 that should be made available to WirePlumber for filter chains.

Config packages have their required LV2 plugins added automatically, so they don't need to be specified here. Config packages need to set passthru.requiredLv2Packages for this to work.

Type: list of package

Default

[ ]

Example

[ pkgs.lsp-plugins ]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/desktops/pipewire/wireplumber.nix

services.pipewire.wireplumber.extraScripts

Additional scripts for WirePlumber to be used by configuration files.

Every item in this attrset becomes a separate lua file with the path relative to the scripts directory specified in the name of the item. The scripts get passed to the WirePlumber service via the XDG_DATA_DIRS variable. Scripts specified here are preferred over those shipped with WirePlumber if they occupy the same relative path.

For a script to be loaded, it needs to be specified as part of a component, and that component needs to be required by an active profile (e.g. main). Components can be defined in config files either via extraConfig or configPackages.

For the hello-world example, you'd have to add the following extraConfig:

  services.pipewire.wireplumber.extraConfig."99-hello-world" = {
    "wireplumber.components" = [
      {
        name = "test/hello-world.lua";
        type = "script/lua";
        provides = "custom.hello-world";
      }
    ];

    "wireplumber.profiles" = {
      main = {
        "custom.hello-world" = "required";
      };
    };
  };

See also: - Location of scripts - Components & Profiles - Migration - Loading custom scripts

Type: attribute set of strings concatenated with "\n"

Default

{ }

Example

{"test/hello-world.lua" = '' print("Hello, world!") '';}

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/desktops/pipewire/wireplumber.nix

services.pipewire.wireplumber.package

The WirePlumber derivation to use. Type: package

Default

pkgs.wireplumber

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/desktops/pipewire/wireplumber.nix