2024-05-07 22:02:59 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
config,
|
|
|
|
pkgs,
|
|
|
|
...
|
|
|
|
}:
|
2024-02-29 14:53:34 +00:00
|
|
|
|
|
|
|
let
|
2024-05-07 22:02:59 +00:00
|
|
|
cfg = config.host.ui.bluetooth;
|
2024-02-29 14:53:34 +00:00
|
|
|
in
|
|
|
|
with lib;
|
|
|
|
{
|
|
|
|
|
2024-05-07 22:02:59 +00:00
|
|
|
options = {
|
|
|
|
host.ui.bluetooth = {
|
|
|
|
enable = mkEnableOption (mdDoc "Enables bluetooth");
|
|
|
|
};
|
|
|
|
};
|
2024-02-29 14:53:34 +00:00
|
|
|
|
2024-05-07 22:02:59 +00:00
|
|
|
config = mkIf cfg.enable {
|
|
|
|
# Set up Bluetooth
|
|
|
|
hardware.bluetooth = {
|
|
|
|
enable = true;
|
|
|
|
powerOnBoot = true;
|
|
|
|
settings = {
|
|
|
|
General = {
|
|
|
|
Enable = "Source,Sink,Media,Socket";
|
|
|
|
Experimental = true;
|
|
|
|
KernelExperimental = true;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2024-02-29 14:53:34 +00:00
|
|
|
|
2024-05-07 22:02:59 +00:00
|
|
|
# Add Bluetooth LE audio support
|
|
|
|
environment.systemPackages = with pkgs; [ liblc3 ];
|
|
|
|
};
|
|
|
|
}
|