nixos-config/modules/pulseaudio.nix

30 lines
770 B
Nix
Raw Normal View History

2020-12-05 13:48:06 +01:00
{ config, lib, pkgs, ... }:
let
bluetoothSupport = config.sbruder.full;
in
lib.mkIf config.sbruder.gui.enable {
2020-08-22 17:44:39 +02:00
sound.enable = true;
2020-11-05 15:09:12 +01:00
hardware.pulseaudio = {
enable = true;
daemon.config = {
"default-sample-format" = "s16le";
"default-sample-rate" = "48000";
"alternate-sample-rate" = "44100";
"resample-method" = "soxr-hq";
"flat-volumes" = "no";
};
} // lib.optionalAttrs bluetoothSupport {
package = pkgs.pulseaudioFull;
extraModules = [
pkgs.pulseaudio-modules-bt # Non-standard codecs for bluetooth
];
2020-08-22 17:44:39 +02:00
};
environment.systemPackages = with pkgs; [
pavucontrol
];
hardware.bluetooth.enable = lib.mkDefault bluetoothSupport;
services.blueman.enable = lib.mkDefault bluetoothSupport;
2020-08-22 17:44:39 +02:00
}