- 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.
40 lines
976 B
Nix
40 lines
976 B
Nix
{ ... }:
|
|
{
|
|
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;
|
|
};
|
|
};
|
|
}
|
|
];
|
|
};
|
|
}
|