2021-12-20 13:37:26 -05:00
|
|
|
## Setup pipewire, including bluetooth audio
|
2022-05-25 19:21:31 -04:00
|
|
|
{ config, pkgs, ... }:
|
2022-06-01 19:19:50 -04:00
|
|
|
let new-noisetorch = pkgs.noisetorch.overrideAttrs (old: {
|
|
|
|
src = pkgs.fetchFromGitHub {
|
|
|
|
owner = "noisetorch";
|
|
|
|
repo = "NoiseTorch";
|
|
|
|
rev = "fe3ace8cc7add2f3bd42dd767c8fc292bc2aeaad";
|
|
|
|
fetchSubmodules = true;
|
|
|
|
hash = "sha256-A6cX1ck47/ZIn9cnV/Ow4CxVFfOX5J0K0Q+B70jCFdQ=";
|
|
|
|
};
|
|
|
|
version = "0.12.0";
|
|
|
|
meta.insecure = false;
|
|
|
|
});
|
|
|
|
in
|
2021-12-20 13:37:26 -05:00
|
|
|
{
|
|
|
|
# Disable normal audio subsystem explicitly
|
|
|
|
sound.enable = false;
|
|
|
|
# Turn on rtkit, so that audio processes can be upgraded to real time
|
|
|
|
security.rtkit.enable = true;
|
|
|
|
# Turn on pipewire
|
|
|
|
services.pipewire = {
|
|
|
|
enable = true;
|
|
|
|
# Turn on all the emulation layers
|
|
|
|
alsa = {
|
|
|
|
enable = true;
|
|
|
|
support32Bit = true;
|
|
|
|
};
|
|
|
|
pulse.enable = true;
|
|
|
|
jack.enable = true;
|
|
|
|
};
|
|
|
|
# Turn on bluetooth services
|
|
|
|
services.blueman.enable = true;
|
|
|
|
hardware.bluetooth = {
|
|
|
|
enable = true;
|
|
|
|
package = pkgs.bluezFull;
|
|
|
|
};
|
|
|
|
# Add pulse audio packages, but do not enable them
|
|
|
|
environment.systemPackages = [
|
|
|
|
pkgs.pulseaudio
|
2022-06-08 10:08:36 -04:00
|
|
|
pkgs.pavucontrol
|
2021-12-20 13:37:26 -05:00
|
|
|
];
|
|
|
|
# Add noisetorch for microphone noise canceling
|
2022-06-01 19:19:50 -04:00
|
|
|
programs.noisetorch = {
|
|
|
|
enable = true; # TODO: https://github.com/noisetorch/NoiseTorch/releases/tag/0.11.6
|
|
|
|
# Use latest noisetorch, its a fast moving target
|
|
|
|
package = new-noisetorch;
|
|
|
|
};
|
2021-12-20 13:37:26 -05:00
|
|
|
}
|