45 lines
997 B
Nix
45 lines
997 B
Nix
{ config, lib, ... }:
|
|
let
|
|
inherit (lib) mkEnableOption mkIf;
|
|
|
|
cfg = config.ataraxia.defaults.sound;
|
|
in
|
|
{
|
|
options.ataraxia.defaults.sound = {
|
|
enable = mkEnableOption "Default sound settings";
|
|
};
|
|
|
|
config = mkIf cfg.enable {
|
|
security.rtkit.enable = true;
|
|
services.pulseaudio.enable = false;
|
|
|
|
services.pipewire = {
|
|
enable = true;
|
|
alsa.enable = true;
|
|
alsa.support32Bit = true;
|
|
pulse.enable = true;
|
|
wireplumber.enable = true;
|
|
wireplumber.extraConfig = {
|
|
"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"
|
|
];
|
|
};
|
|
};
|
|
extraConfig.client = {
|
|
"10-no-resample" = {
|
|
"stream.properties" = {
|
|
"resample.disable" = true;
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
}
|