aboutsummaryrefslogtreecommitdiff
path: root/modules/workstation/sound/default.nix
blob: 37932528c3c88f1e9c91d6467b285522d55a870d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
{ config, pkgs, ... }:

{
  sound.enable = true;

  services.jack.jackd.enable = true;

  environment.systemPackages = [ pkgs.pasystray ];
  
  hardware.pulseaudio = let
    bt = config.hardware.bluetooth.enable;
  in
    with pkgs;
    {
      enable = true;
      zeroconf.discovery.enable = true; 

      # If a computer has bluetooth enabled, we want to pull in the
      # "big" pulseaudio package that includes bluetooth support.
      package = if bt then pulseaudioFull else pulseaudio;
      extraModules = if bt then [ pulseaudio-modules-bt ] else [];
    };
}