42 lines
1015 B
Nix
42 lines
1015 B
Nix
{ config, pkgs, ... }:
|
|
|
|
{
|
|
############################
|
|
# Bluetooth hardware
|
|
############################
|
|
hardware.bluetooth = {
|
|
enable = true; # turn on the daemon
|
|
powerOnBoot = true; # auto-power on
|
|
package = [ pkgs.bluez ];
|
|
|
|
# extra config for the Bluetooth service itself
|
|
extraConfig = ''
|
|
AutoEnable=true
|
|
DiscoverableTimeout=0
|
|
PairableTimeout=0
|
|
'';
|
|
};
|
|
|
|
############################
|
|
# PipeWire for Bluetooth audio
|
|
############################
|
|
services.pipewire = {
|
|
enable = true; # enable the PipeWire daemon
|
|
# No raw extraConfig needed — Bluetooth audio is automatically handled
|
|
configPackages = [
|
|
pkgs.pipewire
|
|
pkgs.pipewire-pulse
|
|
pkgs.pipewire-alsa
|
|
pkgs.pipewire-jack
|
|
pkgs.pipewire-media-session
|
|
];
|
|
};
|
|
|
|
############################
|
|
# GUI Bluetooth manager
|
|
############################
|
|
environment.systemPackages = with pkgs; [
|
|
blueman # graphical Bluetooth manager
|
|
];
|
|
}
|