{
  config,
  lib,
  ...
}:

{
  imports = [ ];

  options.me = {
    bluetooth.enable = lib.mkOption {
      type = lib.types.bool;
      default = false;
      example = true;
      description = "Whether we want to install bluetooth.";
    };
  };

  config = lib.mkIf config.me.bluetooth.enable {
    hardware.bluetooth = {
      enable = true;
      powerOnBoot = true;
      settings = {
        General = {
          # Enable support for showing battery charge level.
          Experimental = true;
        };
      };
    };

    environment.persistence."/persist" = lib.mkIf (config.me.mountPersistence) {
      hideMounts = true;
      directories = [
        "/var/lib/bluetooth" # Bluetooth pairing information.
      ];
    };
  };
}
