From 0d8103327cbfd36830431b77ced847f9179926a0 Mon Sep 17 00:00:00 2001 From: workflow <4farlion@gmail.com> Date: Tue, 11 Jun 2024 11:08:14 +0100 Subject: [PATCH] feat(wireplumber): disable unused sinks and card --- system/audio.nix | 55 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) diff --git a/system/audio.nix b/system/audio.nix index b732fd5..2564eab 100644 --- a/system/audio.nix +++ b/system/audio.nix @@ -13,6 +13,7 @@ alsa.enable = true; alsa.support32Bit = true; pulse.enable = true; + wireplumber.extraConfig = { # Enable Fancy Blueooth Codecs "monitor.bluez.properties" = { @@ -21,6 +22,60 @@ "bluez5.enable-hw-volume" = true; "bluez5.roles" = [ "hsp_hs" "hsp_ag" "hfp_hf" "hfp_ag" ]; }; + + # Disable unused sinks and sources + "disable-unused-nodes" = { + "monitor.alsa.rules" = [ + { + matches = [ + { + "node.nick" = "HDMI / DisplayPort 1 Output"; + } + ]; + actions = { + update-props = { + "node.disabled" = true; + }; + }; + } + { + matches = [ + { + "node.nick" = "HDMI / DisplayPort 2 Output"; + } + ]; + actions = { + update-props = { + "node.disabled" = true; + }; + }; + } + { + matches = [ + { + "node.nick" = "HDMI / DisplayPort 3 Output"; + } + ]; + actions = { + update-props = { + "node.disabled" = true; + }; + }; + } + { + matches = [ + { + "device.nick" = "HDA NVidia"; + } + ]; + actions = { + update-props = { + "device.disabled" = true; + }; + }; + } + ]; + }; }; };