{ config, lib, pkgs, ... }: let cfg = config.jalr; in { options.jalr = { bluetooth.enable = pkgs.lib.mkEnableOption "Enable bluetooth" // { default = false; }; }; config = lib.mkIf cfg.bluetooth.enable { hardware.bluetooth.enable = true; services = { blueman.enable = true; ofono.enable = true; upower.enable = true; }; hardware.bluetooth.settings.General.Experimental = true; # to show battery state }; }