nix-conf/modules/hardware/bluetooth/default.nix
2023-03-14 13:50:59 +01:00

19 lines
447 B
Nix

{ options, config, pkgs, lib, ... }:
with lib;
#with lib.internal;
let cfg = config.custom.hardware.bluetooth;
in
{
options.custom.hardware.bluetooth = with types; {
enable = mkBoolOpt false "Whether or not to enable bluetooth";
};
config = mkIf cfg.enable {
hardware.bluetooth.enable = true;
hardware.bluetooth.hsphfpd.enable = !config.services.pipewire.wireplumber.enable;
hardware.bluetooth.powerOnBoot = true;
};
}