From b165ca7e1f11178de64d603b25f37a186f5778c2 Mon Sep 17 00:00:00 2001 From: coolneng Date: Sun, 1 May 2022 19:50:01 +0200 Subject: [PATCH] Adapt pipewire-pulse configuration to enable TCP --- modules/audio.nix | 24 +++++++----------------- 1 file changed, 7 insertions(+), 17 deletions(-) diff --git a/modules/audio.nix b/modules/audio.nix index 3d0116d..8ed9d1b 100644 --- a/modules/audio.nix +++ b/modules/audio.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, ... }: +{ config, lib, pkgs, inputs, ... }: with pkgs; @@ -12,28 +12,18 @@ in { # Configure pipewire as sound server services.pipewire = { enable = true; - media-session.enable = false; alsa = { enable = true; support32Bit = true; }; pulse.enable = true; wireplumber.enable = true; - config.pipewire-pulse."context.modules" = [ - { - "args" = { }; - "flags" = [ "ifexists" "nofail" ]; - "name" = "libpipewire-module-rtkit"; - } - { "name" = "libpipewire-module-protocol-native"; } - { "name" = "libpipewire-module-client-node"; } - { "name" = "libpipewire-module-adapter"; } - { "name" = "libpipewire-module-metadata"; } - { - "args" = { "server.address" = [ "unix:native" "tcp:4713" ]; }; - "name" = "libpipewire-module-protocol-pulse"; - } - ]; + config.pipewire-pulse = let + defaultConf = lib.importJSON + "${inputs.nixpkgs}/nixos/modules/services/desktops/pipewire/daemon/pipewire-pulse.conf.json"; + in lib.recursiveUpdate defaultConf { + "pulse.properties" = { "server.address" = [ "unix:native" "tcp:4713" ]; }; + }; }; security.rtkit.enable = true;