2023-11-17 07:17:12 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
config,
|
|
|
|
pkgs,
|
|
|
|
...
|
|
|
|
}: let
|
2023-11-29 18:37:42 +00:00
|
|
|
cfg = config.myFlake.nixos.hardware.components.misc.bluetooth;
|
2023-11-17 07:17:12 +00:00
|
|
|
in {
|
|
|
|
options = {
|
2023-11-29 18:37:42 +00:00
|
|
|
myFlake.nixos.hardware.components.misc.bluetooth.enable = lib.mkEnableOption "Whether to enable bluetooth.";
|
2023-11-17 07:17:12 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
# https://nixos.wiki/wiki/Bluetooth
|
|
|
|
config = lib.mkIf cfg.enable {
|
|
|
|
# Bluetooth manager
|
|
|
|
#services.blueman.enable = true;
|
|
|
|
environment.systemPackages = lib.mkIf config.services.xserver.enable (with pkgs; [blueberry]);
|
|
|
|
|
|
|
|
# Bluetooth service
|
|
|
|
hardware.bluetooth = {
|
|
|
|
enable = true;
|
|
|
|
settings.General.FastConnectable = true;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|