sneeuwvlok/modules/nixos/hardware/bluetooth.nix
2026-03-30 10:29:26 +02:00

30 lines
733 B
Nix

{
lib,
config,
...
}: let
inherit (lib) mkIf mkEnableOption;
cfg = config.sneeuwvlok.hardware.has.bluetooth;
in {
options.sneeuwvlok.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"];
};
};
};
}