{ config, lib, pkgs, ... }: let inherit (lib.modules) mkIf; cfg = config.modules.system.hardware.bluetooth; in { config = mkIf cfg.enable { hardware.bluetooth = { enable = true; inherit (cfg) powerOnBoot; }; environment.systemPackages = builtins.attrValues { inherit (pkgs) bluetuith bluez blueman ; }; }; }