feat(nix): add sound configuration for PipeWire priorities

- Introduced `sound.nix` to manage audio device priorities using PipeWire's WirePlumber configuration.
- Linked `sound.nix` to `default.nix` for streamlined system audio customization.
- Ensures defined priority levels for HDMI, USB microphones, and SPDIF outputs.
This commit is contained in:
Harald Hoyer 2026-02-09 15:45:14 +01:00
parent 5075593ce0
commit d5cb9658be
2 changed files with 41 additions and 0 deletions

View file

@ -0,0 +1,40 @@
{ ... }:
{
services.pipewire.wireplumber.extraConfig."51-audio-priorities" = {
"monitor.alsa.rules" = [
{
matches = [
{ "node.name" = "alsa_output.pci-0000_73_00.1.hdmi-stereo"; }
];
actions = {
update-props = {
"priority.session" = 2000;
"priority.driver" = 2000;
};
};
}
{
matches = [
{ "node.name" = "alsa_output.usb-R__DE_Microphones_R__DE_NT-USB_Mini_6893EA23-00.analog-stereo"; }
];
actions = {
update-props = {
"priority.session" = 1500;
"priority.driver" = 1500;
};
};
}
{
matches = [
{ "node.name" = "alsa_output.usb-Generic_USB_Audio-00.HiFi__SPDIF__sink"; }
];
actions = {
update-props = {
"priority.session" = 1000;
"priority.driver" = 1000;
};
};
}
];
};
}