2019-10-24 02:20:38 +02:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
let
|
|
|
|
|
|
|
|
cfg = config.system.custom.bluetooth;
|
|
|
|
|
|
|
|
in {
|
|
|
|
|
2019-12-20 05:54:26 +01:00
|
|
|
options.system.custom.bluetooth.enable =
|
|
|
|
lib.mkEnableOption "enable bluetooth support";
|
2019-10-24 02:20:38 +02:00
|
|
|
|
|
|
|
config = lib.mkIf cfg.enable {
|
|
|
|
|
|
|
|
hardware.bluetooth = {
|
2019-12-20 05:54:26 +01:00
|
|
|
enable = true;
|
2019-10-24 02:20:38 +02:00
|
|
|
powerOnBoot = true;
|
2020-05-16 02:25:06 +02:00
|
|
|
config.General.AutoConnect = true;
|
2019-10-24 02:20:38 +02:00
|
|
|
};
|
|
|
|
|
2020-04-13 21:10:54 +02:00
|
|
|
services.blueman.enable = true;
|
|
|
|
|
2019-12-20 05:54:26 +01:00
|
|
|
environment.systemPackages = with pkgs; [
|
2019-10-24 02:20:38 +02:00
|
|
|
|
|
|
|
# bluetooth audio
|
|
|
|
# ---------------
|
|
|
|
# todo : check if pulseaudio is enabled
|
|
|
|
bluez
|
|
|
|
bluez-tools
|
|
|
|
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|