nix-config/config/hardware/bluetooth.nix

30 lines
779 B
Nix
Raw Normal View History

2024-07-26 22:12:48 +02:00
{ pkgs, ... }:
{
environment.systemPackages = with pkgs; [ bluetuith ];
hardware.bluetooth = {
enable = true;
2024-07-15 16:40:11 +02:00
powerOnBoot = false;
2024-07-26 22:12:48 +02:00
disabledPlugins = [ "sap" ];
settings = {
General = {
FastConnectable = "true";
JustWorksRepairing = "always";
MultiProfile = "multiple";
Enable = "Source,Sink,Media,Socket";
};
};
};
hardware.pulseaudio = {
2024-07-26 22:12:48 +02:00
package = pkgs.pulseaudio.override { bluetoothSupport = true; };
extraConfig = ''
load-module module-bluetooth-discover
load-module module-bluetooth-policy
load-module module-switch-on-connect
'';
2024-07-26 22:12:48 +02:00
extraModules = with pkgs; [ pulseaudio-modules-bt ];
};
2024-07-26 22:12:48 +02:00
environment.persistence."/state".directories = [ "/var/lib/bluetooth" ];
}