puzzlevision/modules/nixos/common/bluetooth/default.nix
Jo 078657f1e2 feat(module): add common hardware/peripherals module
refactor(module): move audio configuration to module
2024-09-07 08:46:55 +02:00

31 lines
664 B
Nix

{
lib,
pkgs,
namespace,
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 {
environment.systemPackages = with pkgs; [ bluez ];
hardware.bluetooth = {
enable = true;
powerOnBoot = true;
package = pkgs.bluez;
settings = {
General = {
ControllerMode = "dual";
FastConnectable = "true";
Experimental = "true";
KernelExperimental = "true";
};
};
};
};
}