{ config, lib, pkgs, ... }: with lib; let cfg = config.nixfiles.modules.bluetooth; in { options.nixfiles.modules.bluetooth.enable = mkEnableOption "Bluetooth support"; config = mkIf cfg.enable { ark.directories = ["/var/lib/bluetooth"]; hardware.bluetooth = { enable = true; settings.General.FastConnectable = true; }; environment = { etc."bluetooth/input.conf".text = generators.toINI {} { General = { IdleTimeout = 15; UserspaceHID = true; }; }; }; }; }