76 lines
2.1 KiB
Nix
76 lines
2.1 KiB
Nix
{ pkgs, ... }: {
|
|
services = {
|
|
pipewire = {
|
|
enable = true;
|
|
alsa.enable = true;
|
|
alsa.support32Bit = true;
|
|
pulse.enable = true;
|
|
# If you want to use JACK applications, uncomment this
|
|
#jack.enable = true;
|
|
|
|
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; [
|
|
# audio control software
|
|
pamixer
|
|
];
|
|
}
|