2024-06-24 15:38:28 +00:00
|
|
|
# Configures bluetooth.
|
2024-05-07 22:02:59 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
config,
|
|
|
|
pkgs,
|
|
|
|
...
|
|
|
|
}:
|
2024-02-29 14:53:34 +00:00
|
|
|
|
|
|
|
let
|
2024-06-24 15:38:28 +00:00
|
|
|
cfg = config.aux.system.bluetooth;
|
2024-02-29 14:53:34 +00:00
|
|
|
in
|
|
|
|
{
|
|
|
|
|
2024-05-07 22:02:59 +00:00
|
|
|
options = {
|
2024-06-24 15:38:28 +00:00
|
|
|
aux.system.bluetooth = {
|
2024-09-08 15:58:56 +00:00
|
|
|
enable = lib.mkEnableOption "Enables bluetooth.";
|
2024-05-07 22:02:59 +00:00
|
|
|
};
|
|
|
|
};
|
2024-02-29 14:53:34 +00:00
|
|
|
|
2024-06-24 15:38:28 +00:00
|
|
|
config = lib.mkIf cfg.enable {
|
2024-05-07 22:02:59 +00:00
|
|
|
# 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 ];
|
|
|
|
};
|
|
|
|
}
|