Adapt pipewire-pulse configuration to enable TCP

This commit is contained in:
coolneng 2022-05-01 19:50:01 +02:00
parent 14eadfd653
commit b165ca7e1f
Signed by: coolneng
GPG Key ID: 9893DA236405AF57
1 changed files with 7 additions and 17 deletions

View File

@ -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;