2024-09-06 17:43:30 +02:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
pkgs,
|
2024-09-07 08:46:55 +02:00
|
|
|
namespace,
|
2024-09-06 17:43:30 +02:00
|
|
|
config,
|
|
|
|
...
|
|
|
|
}: with lib; with lib.${namespace};
|
|
|
|
let
|
|
|
|
cfg = config.${namespace}.common.bluetooth;
|
|
|
|
in {
|
|
|
|
options.${namespace}.common.bluetooth = { enable = mkEnableOption "Enable bluetooth support on your current system"; };
|
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
2024-09-10 10:46:16 +02:00
|
|
|
environment.systemPackages = with pkgs; [ bluez blueman ];
|
2024-09-07 08:46:55 +02:00
|
|
|
|
2024-09-06 17:43:30 +02:00
|
|
|
hardware.bluetooth = {
|
|
|
|
enable = true;
|
|
|
|
powerOnBoot = true;
|
|
|
|
package = pkgs.bluez;
|
|
|
|
|
|
|
|
settings = {
|
|
|
|
General = {
|
|
|
|
ControllerMode = "dual";
|
|
|
|
FastConnectable = "true";
|
|
|
|
Experimental = "true";
|
|
|
|
KernelExperimental = "true";
|
2024-09-10 10:46:16 +02:00
|
|
|
Disable= "Handsfree";
|
2024-09-06 17:43:30 +02:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2024-09-06 17:53:13 +02:00
|
|
|
};
|
2024-09-06 17:43:30 +02:00
|
|
|
}
|