blob: c5da0fac12c6c77ebbdaf8e7f1d211ce0fe4300d (
plain) (
tree)
|
|
{
config,
options,
lib,
pkgs,
...
}: let
bluetoothConfig = config.modules.hardware.bluetooth;
device = config.modules.device;
in {
options.modules.hardware.bluetooth = {
enable = lib.mkOption {
type = lib.types.bool;
default = true;
};
};
config = lib.mkIf (bluetoothConfig.enable && device.hasBluetooth) {
hardware.bluetooth = {
enable = true;
powerOnBoot = true;
};
services.blueman.enable = true;
user.extraGroups = ["bluetooth"];
};
}
|