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:
parent
5075593ce0
commit
d5cb9658be
2 changed files with 41 additions and 0 deletions
|
|
@ -9,6 +9,7 @@ with lib.metacfg;
|
||||||
imports = [
|
imports = [
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
./xremap.nix
|
./xremap.nix
|
||||||
|
./sound.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
powerManagement.cpuFreqGovernor = "performance";
|
powerManagement.cpuFreqGovernor = "performance";
|
||||||
|
|
|
||||||
40
systems/x86_64-linux/amd/sound.nix
Normal file
40
systems/x86_64-linux/amd/sound.nix
Normal 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;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue