summaryrefslogtreecommitdiff
path: root/nixos/features/services/hardware/bluetooth.nix
blob: a9829acbf0a4a4e9309f4ac0e68f3642d52ff68a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
{ config, pkgs, lib, ... }: let
  cfg = config.features.services.hardware.bluetooth;
in {
  options.features.services.hardware.bluetooth.enable = lib.mkEnableOption "bluetooth";
  config = lib.mkIf cfg.enable {
    environment.systemPackages = [ pkgs.bluetui ];
    services.blueman = {
      enable = true;
    };
    hardware.bluetooth = {
      enable = true;
      powerOnBoot = true;
    };
    services.pulseaudio = {
      package = pkgs.pulseaudioFull;
    };
    hardware.bluetooth.settings = {
      General = {
        Enable = "Source,Sink,Media,Socket";
      };
    };
  };
}