This repository has been archived on 2024-11-22. You can view files and clone it, but cannot push or open issues or pull requests.
dotfiles-old/modules/system/bluetooth.nix

29 lines
950 B
Nix
Raw Normal View History

/* -------------------------------------------------------------------------- */
/* 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" ];
};
};
};
}