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

26 lines
586 B
Nix
Raw Normal View History

{
lib,
config,
pkgs,
...
}: let
2023-12-17 12:43:24 +00:00
cfg = config.myFlake.hardware.components.bluetooth;
in {
options = {
2023-12-17 12:43:24 +00:00
myFlake.hardware.components.bluetooth.enable = lib.mkEnableOption "Whether to enable bluetooth.";
};
# 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;
};
};
}