{ config, pkgs, ... }: let cfg = config.libkookie.audio; in { sound.enable = cfg.enable; # TODO: make jack work ;_; # services.jack.jackd.enable = cfg.jack; hardware.pulseaudio = let bt = config.hardware.bluetooth.enable; in with pkgs; { enable = true; support32Bit = true; zeroconf.discovery.enable = cfg.discovery; package = if bt then pulseaudioFull else pulseaudio; extraModules = if bt then [ pulseaudio-modules-bt ] else []; }; }