nix-config/modules/nixos/hardware/bluetooth/default.nix
Bruno BELANYI 6a9ac77b0c
All checks were successful
ci/woodpecker/push/check Pipeline was successful
nixos: hardware: bluetooth: remove pipewire conf
Turns out the wireplumber configuration I was setting up is redundant
with the upstream default (which work better, becomes they use a quirks
database...).

It was also out-of-date due to the update to v0.5, which changed the
configuration format...
2024-06-14 21:19:07 +01:00

39 lines
964 B
Nix

{ config, lib, pkgs, ... }:
let
cfg = config.my.hardware.bluetooth;
in
{
options.my.hardware.bluetooth = with lib; {
enable = mkEnableOption "bluetooth configuration";
enableHeadsetIntegration = my.mkDisableOption "A2DP sink configuration";
loadExtraCodecs = my.mkDisableOption "extra audio codecs";
};
config = lib.mkIf cfg.enable (lib.mkMerge [
# Enable bluetooth devices and GUI to connect to them
{
hardware.bluetooth.enable = true;
services.blueman.enable = true;
}
# Support for additional bluetooth codecs
(lib.mkIf cfg.loadExtraCodecs {
hardware.pulseaudio = {
extraModules = [ pkgs.pulseaudio-modules-bt ];
package = pkgs.pulseaudioFull;
};
})
# Support for A2DP audio profile
(lib.mkIf cfg.enableHeadsetIntegration {
hardware.bluetooth.settings = {
General = {
Enable = "Source,Sink,Media,Socket";
};
};
})
]);
}