summaryrefslogtreecommitdiff
path: root/modules/nixos/bluetooth.nix
blob: 26d081d9afb4c58e7c57ed389930235c1c0f4ab2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
{
  config,
  lib,
  ...
}:
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;
      input.General = {
        IdleTimeout = 15;
        UserspaceHID = true;
      };
    };
  };
}