dotfiles/nix/nixos-modules/pulseaudio.nix
Magic_RB d3e46e5413
Complete module rework
Signed-off-by: Magic_RB <magic_rb@redalder.org>
2021-08-19 18:24:36 +02:00

25 lines
555 B
Nix

{ config, lib, pkgs, ... }:
with lib;
let
bluetooth-enable = config.hardware.bluetooth.enable;
cfg = config.magic_rb.pulseaudio;
in
{
options.magic_rb.pulseaudio = {
enable = mkEnableOption "Enable pulseaudio, with bluetooth support if bt enabled";
};
config = mkIf cfg.enable {
sound.enable = true;
hardware = {
pulseaudio = {
enable = true;
package = mkIf bluetooth-enable pkgs.pulseaudioFull;
};
pulseaudio.support32Bit = true;
};
systemd.user.services.pulseaudio.enable = true;
};
}