2022-07-31 11:03:59 +02:00
|
|
|
# SPDX-FileCopyrightText: 2022 Richard Brežák <richard@brezak.sk>
|
|
|
|
#
|
|
|
|
# SPDX-License-Identifier: LGPL-3.0-or-later
|
|
|
|
{
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
pkgs,
|
|
|
|
...
|
|
|
|
}:
|
|
|
|
with lib; let
|
2021-04-11 00:25:36 +02:00
|
|
|
bluetooth-enable = config.hardware.bluetooth.enable;
|
|
|
|
cfg = config.magic_rb.pulseaudio;
|
2022-07-31 11:03:59 +02:00
|
|
|
in {
|
2021-04-11 00:25:36 +02:00
|
|
|
options.magic_rb.pulseaudio = {
|
|
|
|
enable = mkEnableOption "Enable pulseaudio, with bluetooth support if bt enabled";
|
|
|
|
};
|
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
2022-08-18 22:55:46 +02:00
|
|
|
security.rtkit.enable = true;
|
|
|
|
services.pipewire = {
|
|
|
|
enable = true;
|
|
|
|
alsa.enable = true;
|
|
|
|
alsa.support32Bit = true;
|
|
|
|
pulse.enable = true;
|
|
|
|
jack.enable = true;
|
2021-04-11 00:25:36 +02:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|