29 lines
950 B
Nix
29 lines
950 B
Nix
|
/* -------------------------------------------------------------------------- */
|
||
|
/* System Utility - Bluetooth config */
|
||
|
/* -------------------------------------------------------------------------- */
|
||
|
|
||
|
{ lib, config, options, pkgs, ... }:
|
||
|
|
||
|
with lib;
|
||
|
let cfg = config.modules.system.bluetooth;
|
||
|
in {
|
||
|
options.modules.system.bluetooth = {
|
||
|
enable = mkEnableOption true;
|
||
|
};
|
||
|
|
||
|
config = mkIf cfg.enable {
|
||
|
hardware.bluetooth.enable = true;
|
||
|
hardware.bluetooth.powerOnBoot = true;
|
||
|
services.blueman.enable = true;
|
||
|
|
||
|
services.pipewire.wireplumber.enable = true;
|
||
|
services.pipewire.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" ];
|
||
|
};
|
||
|
};
|
||
|
};
|
||
|
}
|