Update pipewire configuration
This commit is contained in:
parent
dd75a52d28
commit
91526b8803
|
@ -18,15 +18,17 @@
|
||||||
hardware.pulseaudio = {
|
hardware.pulseaudio = {
|
||||||
enable = true;
|
enable = true;
|
||||||
systemWide = true;
|
systemWide = true;
|
||||||
tcp.enable = true;
|
tcp = {
|
||||||
tcp.anonymousClients.allowedIpRanges = [
|
enable = true;
|
||||||
"127.0.0.0/8"
|
anonymousClients.allowedIpRanges = [
|
||||||
"::1/128"
|
"127.0.0.0/8"
|
||||||
"fd23:42:c3d2:500::/56"
|
"::1/128"
|
||||||
"172.22.99.0/24"
|
"fd23:42:c3d2:500::/56"
|
||||||
"172.20.72.0/21"
|
"172.22.99.0/24"
|
||||||
"2a00:8180:2c00:200::/56"
|
"172.20.72.0/21"
|
||||||
];
|
"2a00:8180:2c00:200::/56"
|
||||||
|
];
|
||||||
|
};
|
||||||
zeroconf.publish.enable = true;
|
zeroconf.publish.enable = true;
|
||||||
package = (pkgs.pulseaudio.override {
|
package = (pkgs.pulseaudio.override {
|
||||||
bluetoothSupport = true;
|
bluetoothSupport = true;
|
||||||
|
@ -38,13 +40,14 @@
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
# TODO: configure system wide service
|
# pipewire has no systemwide pipewire-pulse
|
||||||
#services.pipewire = {
|
# services.pipewire = {
|
||||||
# enable = true;
|
# enable = true;
|
||||||
# alsa.enable = true;
|
# config.pipewire-pulse = lib.importJSON ./pipewire-pulse.conf.json;
|
||||||
# config.pipewire-pulse = lib.importJSON ./pipewire-pulse.conf.json;
|
# pulse.enable = true;
|
||||||
# pulse.enable = true;
|
# socketActivation = false;
|
||||||
#};
|
# systemWide = true;
|
||||||
|
# };
|
||||||
|
|
||||||
security.rtkit.enable = true;
|
security.rtkit.enable = true;
|
||||||
|
|
||||||
|
|
|
@ -4,6 +4,6 @@
|
||||||
# shellcheck shell=bash
|
# shellcheck shell=bash
|
||||||
|
|
||||||
dir=$(dirname "$(readlink -f "$0")")
|
dir=$(dirname "$(readlink -f "$0")")
|
||||||
default_pipewire_pulse=$(nix-instantiate --eval -E '(import <nixos> { }).pkgs.path')/nixos/modules/services/desktops/pipewire/pipewire-pulse.conf.json
|
default_pipewire_pulse=$(nix-instantiate --eval -E '(import <nixos> { }).pkgs.path')/nixos/modules/services/desktops/pipewire/daemon/pipewire-pulse.conf.json
|
||||||
|
|
||||||
jq -s '.[0] * .[1] * .[2]' "$dir/pipewire-pulse.conf.in.json" "$default_pipewire_pulse" > "$dir/pipewire-pulse.conf.json" <(jq -cnS '{ "context.modules": [ inputs."context.modules" ] | add}' "$default_pipewire_pulse" "$dir/pipewire-pulse.conf.in.json")
|
jq -s '.[0] * .[1] * .[2]' "$dir/pipewire-pulse.conf.in.json" "$default_pipewire_pulse" > "$dir/pipewire-pulse.conf.json" <(jq -cnS '{ "context.modules": [ inputs."context.modules" ] | add}' "$default_pipewire_pulse" "$dir/pipewire-pulse.conf.in.json")
|
||||||
|
|
|
@ -6,10 +6,25 @@
|
||||||
{
|
{
|
||||||
"name": "libpipewire-module-protocol-pulse",
|
"name": "libpipewire-module-protocol-pulse",
|
||||||
"args": {
|
"args": {
|
||||||
|
"auth-ip-acl": [
|
||||||
|
"127.0.0.0/8",
|
||||||
|
"::1/128",
|
||||||
|
"fd23:42:c3d2:500::/56",
|
||||||
|
"172.22.99.0/24",
|
||||||
|
"172.20.72.0/21",
|
||||||
|
"2a00:8180:2c00:200::/56"
|
||||||
|
],
|
||||||
"server.address": [
|
"server.address": [
|
||||||
"unix:native",
|
"unix:native",
|
||||||
"tcp:4713"
|
"tcp:4713"
|
||||||
]
|
],
|
||||||
|
"pulse.min.req": "256/48000",
|
||||||
|
"pulse.default.req": "960/48000",
|
||||||
|
"pulse.min.frag": "256/48000",
|
||||||
|
"pulse.default.frag": "96000/48000",
|
||||||
|
"pulse.default.tlength": "96000/48000",
|
||||||
|
"pulse.min.quantum": "256/48000",
|
||||||
|
"pulse.default.format": "F32"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,12 +1,14 @@
|
||||||
{
|
{
|
||||||
"context.modules": [
|
"context.modules": [
|
||||||
{
|
{
|
||||||
"args": {},
|
"args": {
|
||||||
|
"nice.level": -11
|
||||||
|
},
|
||||||
"flags": [
|
"flags": [
|
||||||
"ifexists",
|
"ifexists",
|
||||||
"nofail"
|
"nofail"
|
||||||
],
|
],
|
||||||
"name": "libpipewire-module-rtkit"
|
"name": "libpipewire-module-rt"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "libpipewire-module-protocol-native"
|
"name": "libpipewire-module-protocol-native"
|
||||||
|
@ -21,19 +23,35 @@
|
||||||
"name": "libpipewire-module-metadata"
|
"name": "libpipewire-module-metadata"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"args": {
|
"args": {},
|
||||||
"server.address": [
|
|
||||||
"unix:native",
|
|
||||||
"tcp:4713"
|
|
||||||
],
|
|
||||||
"vm.overrides": {
|
|
||||||
"pulse.min.quantum": "1024/48000"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "libpipewire-module-protocol-pulse"
|
"name": "libpipewire-module-protocol-pulse"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "libpipewire-module-zeroconf-publish"
|
"name": "libpipewire-module-zeroconf-publish"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"args": {
|
||||||
|
"auth-ip-acl": [
|
||||||
|
"127.0.0.0/8",
|
||||||
|
"::1/128",
|
||||||
|
"fd23:42:c3d2:500::/56",
|
||||||
|
"172.22.99.0/24",
|
||||||
|
"172.20.72.0/21",
|
||||||
|
"2a00:8180:2c00:200::/56"
|
||||||
|
],
|
||||||
|
"pulse.default.format": "F32",
|
||||||
|
"pulse.default.frag": "96000/48000",
|
||||||
|
"pulse.default.req": "960/48000",
|
||||||
|
"pulse.default.tlength": "96000/48000",
|
||||||
|
"pulse.min.frag": "256/48000",
|
||||||
|
"pulse.min.quantum": "256/48000",
|
||||||
|
"pulse.min.req": "256/48000",
|
||||||
|
"server.address": [
|
||||||
|
"unix:native",
|
||||||
|
"tcp:4713"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"name": "libpipewire-module-protocol-pulse"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"context.properties": {},
|
"context.properties": {},
|
||||||
|
@ -41,6 +59,72 @@
|
||||||
"audio.convert.*": "audioconvert/libspa-audioconvert",
|
"audio.convert.*": "audioconvert/libspa-audioconvert",
|
||||||
"support.*": "support/libspa-support"
|
"support.*": "support/libspa-support"
|
||||||
},
|
},
|
||||||
"context.exec": [],
|
"context.exec": [
|
||||||
"stream.properties": {}
|
{
|
||||||
|
"path": "pactl",
|
||||||
|
"args": "load-module module-always-sink"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"stream.properties": {},
|
||||||
|
"pulse.properties": {
|
||||||
|
"server.address": [
|
||||||
|
"unix:native"
|
||||||
|
],
|
||||||
|
"vm.overrides": {
|
||||||
|
"pulse.min.quantum": "1024/48000"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"pulse.rules": [
|
||||||
|
{
|
||||||
|
"matches": [
|
||||||
|
{}
|
||||||
|
],
|
||||||
|
"actions": {
|
||||||
|
"update-props": {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"matches": [
|
||||||
|
{
|
||||||
|
"application.process.binary": "teams"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"application.process.binary": "teams-insiders"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"application.process.binary": "skypeforlinux"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"actions": {
|
||||||
|
"quirks": [
|
||||||
|
"force-s16-info"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"matches": [
|
||||||
|
{
|
||||||
|
"application.process.binary": "firefox"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"actions": {
|
||||||
|
"quirks": [
|
||||||
|
"remove-capture-dont-move"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"matches": [
|
||||||
|
{
|
||||||
|
"application.name": "~speech-dispatcher*"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"actions": {
|
||||||
|
"update-props": {
|
||||||
|
"pulse.min.req": "1024/48000",
|
||||||
|
"pulse.min.quantum": "1024/48000"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue