diff --git a/modules/nixos/audio.nix b/modules/nixos/audio.nix index 9141e14..72f18ad 100644 --- a/modules/nixos/audio.nix +++ b/modules/nixos/audio.nix @@ -8,18 +8,67 @@ # If you want to use JACK applications, uncomment this #jack.enable = true; - wireplumber.extraConfig.bluetoothEnhancements = { - "monitor.bluez.properties" = { - "bluez5.enable-sbc-xq" = true; - "bluez5.enable-msbc" = true; - "bluez5.enable-hw-volume" = true; - "bluez5.roles" = [ "hsp_hs" "hsp_ag" "hfp_hf" "hfp_ag" ]; + wireplumber = { + enable = true; + extraConfig = { + "80-bluetooth-enhancements" = { + "monitor.bluez.properties" = { + "bluez5.enable-sbc-xq" = true; + "bluez5.enable-msbc" = true; + "bluez5.enable-hw-volume" = true; + "bluez5.roles" = [ "hsp_hs" "hsp_ag" "hfp_hf" "hfp_ag" ]; + }; + }; + # Disable suspend for all ALSA nodes + "99-disable-suspend" = { + # ALSA Rules: Separate rule for input and output + "monitor.alsa.rules" = [ + # Rule for ALSA outputs + { + matches = [ + { + # Matches all sinks (outputs) + "node.name" = "~alsa_output.*"; + } + { + # Matches all sources (inputs) + "node.name" = "~alsa_input.*"; + } + ]; + actions = { + "update-props" = { + "session.suspend-timeout-seconds" = 0; + }; + }; + } + ]; + + # Bluez Rules: Separate rule for input and output + "monitor.bluez.rules" = [ + # Rule for Bluez outputs + { + matches = [ + { + "node.name" = "~bluez_output.*"; + } + { + "node.name" = "~bluez_input.*"; + } + ]; + actions = { + "update-props" = { + "session.suspend-timeout-seconds" = 0; + }; + }; + } + ]; + }; }; }; }; }; - environment.systemPackages = with pkgs;[ + environment.systemPackages = with pkgs; [ # audio control software pamixer ];