64 lines
1.5 KiB
Nix
64 lines
1.5 KiB
Nix
{ config, pkgs, lib, ... }:
|
|
|
|
{
|
|
|
|
services.blueman.enable = true;
|
|
|
|
# Enable sound.
|
|
sound.enable = true;
|
|
nixpkgs.config.pulseaudio = true;
|
|
|
|
services.pipewire = {
|
|
enable = true;
|
|
alsa.enable = true;
|
|
pulse.enable = true;
|
|
media-session.enable = true;
|
|
media-session.config.bluez-monitor.rules = [
|
|
{
|
|
# Matches all cards
|
|
matches = [{ "device.name" = "~bluez_card.*"; }];
|
|
actions = {
|
|
"update-props" = {
|
|
"bluez5.reconnect-profiles" = [
|
|
"a2dp_sink"
|
|
]; # Optional: "hfp_hf" "hsp_hs" for microphone support
|
|
# mSBC is not expected to work on all headset + adapter combinations.
|
|
"bluez5.msbc-support" = true;
|
|
# SBC-XQ is not expected to work on all headset + adapter combinations.
|
|
"bluez5.sbc-xq-support" = true;
|
|
};
|
|
};
|
|
}
|
|
{
|
|
matches = [
|
|
# Matches all sources
|
|
{
|
|
"node.name" = "~bluez_input.*";
|
|
}
|
|
# Matches all outputs
|
|
{ "node.name" = "~bluez_output.*"; }
|
|
];
|
|
actions = { "node.pause-on-idle" = false; };
|
|
}
|
|
];
|
|
};
|
|
security.rtkit.enable = true;
|
|
|
|
hardware = {
|
|
pulseaudio.enable = lib.mkForce false;
|
|
opengl.enable = true;
|
|
acpilight.enable = true;
|
|
bluetooth = {
|
|
enable = true;
|
|
package = pkgs.bluezFull;
|
|
};
|
|
logitech.wireless = {
|
|
enable = true;
|
|
enableGraphical = true;
|
|
};
|
|
};
|
|
|
|
programs.light.enable = true;
|
|
programs.adb.enable = true;
|
|
|
|
}
|