2024-06-24 11:38:28 -04:00
|
|
|
# Configures bluetooth.
|
2024-05-07 18:02:59 -04:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
config,
|
|
|
|
pkgs,
|
|
|
|
...
|
|
|
|
}:
|
2024-02-29 09:53:34 -05:00
|
|
|
|
|
|
|
let
|
2024-06-24 11:38:28 -04:00
|
|
|
cfg = config.aux.system.bluetooth;
|
2024-02-29 09:53:34 -05:00
|
|
|
in
|
|
|
|
{
|
|
|
|
|
2024-05-07 18:02:59 -04:00
|
|
|
options = {
|
2024-06-24 11:38:28 -04:00
|
|
|
aux.system.bluetooth = {
|
2024-09-08 11:58:56 -04:00
|
|
|
enable = lib.mkEnableOption "Enables bluetooth.";
|
2024-05-07 18:02:59 -04:00
|
|
|
};
|
|
|
|
};
|
2024-02-29 09:53:34 -05:00
|
|
|
|
2024-06-24 11:38:28 -04:00
|
|
|
config = lib.mkIf cfg.enable {
|
2024-05-07 18:02:59 -04:00
|
|
|
# Set up Bluetooth
|
|
|
|
hardware.bluetooth = {
|
|
|
|
enable = true;
|
|
|
|
powerOnBoot = true;
|
|
|
|
settings = {
|
|
|
|
General = {
|
|
|
|
Enable = "Source,Sink,Media,Socket";
|
|
|
|
Experimental = true;
|
|
|
|
KernelExperimental = true;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2024-02-29 09:53:34 -05:00
|
|
|
|
2024-05-07 18:02:59 -04:00
|
|
|
# Add Bluetooth LE audio support
|
|
|
|
environment.systemPackages = with pkgs; [ liblc3 ];
|
|
|
|
};
|
|
|
|
}
|