Files
nixos/modules/hardware/audio.nix
2026-02-04 22:53:00 +01:00

71 lines
1.3 KiB
Nix

# modules/hardware/audio.nix
# PipeWire audio, Bluetooth, and media controls
{
config,
pkgs,
lib,
...
}:
{
services.pulseaudio.enable = false;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
jack.enable = true;
wireplumber.extraConfig = {
"10-bluez" = {
"monitor.bluez.properties" = {
"bluez5.enable-sbc-xq" = true;
"bluez5.enable-msbc" = true;
"bluez5.enable-hw-volume" = true;
"bluez5.roles" = [
"a2dp_sink"
"a2dp_source"
"bap_sink"
"bap_source"
"hsp_hs"
"hsp_ag"
"hfp_hf"
"hfp_ag"
];
"bluez5.codecs" = [
"ldac"
"aac"
"aptx_hd"
"aptx"
"sbc_xq"
"sbc"
];
};
};
};
};
hardware.bluetooth = {
enable = true;
powerOnBoot = true;
settings = {
General = {
Enable = "Source,Sink,Media,Socket";
Experimental = false;
KernelExperimental = false;
};
Policy = {
AutoEnable = true;
};
};
};
environment.systemPackages = with pkgs; [
pwvucontrol
pavucontrol
playerctl
];
}