sneeuwvlok/modules/nixos/hardware/bluetooth/default.nix
2025-08-03 22:57:21 +02:00

28 lines
744 B
Nix

{ lib, namespace, config, ... }:
let
inherit (lib) mkIf mkEnableOption;
cfg = config.${namespace}.hardware.has.bluetooth;
in
{
options.${namespace}.hardware.has.bluetooth = mkEnableOption "Enable bluetooth";
config = mkIf cfg {
hardware.bluetooth = {
enable = true;
powerOnBoot = true;
settings = {
General.Experimental = true; # Show battery charge of Bluetooth devices
};
};
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" ];
};
};
};
}