{ lib, config, ... }:
let
  inherit (lib) mkEnableOption mkIf;
  cfg = config.modules.system.networking.bluetooth;
in
{
  options.modules.system.networking.bluetooth = {
    enable = mkEnableOption "activate bluetooth capabilities";
  };

  config = mkIf cfg.enable {
    hardware.bluetooth = {
      enable = true;
      powerOnBoot = true;
    };

    services.blueman.enable = true;
  };
}