flake/nixos/modules/my/hardware/bluetooth.nix

22 lines
449 B
Nix
Raw Normal View History

{
lib,
config,
pkgs,
...
}: let
2024-06-15 17:17:50 +00:00
cfg = config.my.hardware.bluetooth;
in {
options = {
2024-06-15 17:17:50 +00:00
my.hardware.bluetooth.enable = lib.mkEnableOption "bluetooth";
};
# https://nixos.wiki/wiki/Bluetooth
config = lib.mkIf cfg.enable {
environment.systemPackages = lib.mkIf config.services.xserver.enable (with pkgs; [blueberry]);
hardware.bluetooth = {
enable = true;
settings.General.FastConnectable = true;
};
};
}