modules: sound: add pipewire configuration

This commit is contained in:
Bruno BELANYI 2021-05-25 18:17:39 +02:00
parent 8b4966fcbe
commit 931b67fdb2

View file

@ -6,6 +6,10 @@ in
options.my.modules.sound = with lib; {
enable = mkEnableOption "sound configuration";
pipewire = {
enable = mkEnableOption "pipewire configuration";
};
pulse = {
enable = mkEnableOption "pulseaudio configuration";
};
@ -17,6 +21,32 @@ in
sound.enable = true;
}
(lib.mkIf cfg.pipewire.enable {
# RealtimeKit is recommended
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa = {
enable = true;
support32Bit = true;
};
pulse = {
enable = true;
};
jack = {
enable = true;
};
media-session = {
enable = true;
};
};
})
# Pulseaudio setup
(lib.mkIf cfg.pulse.enable {
hardware.pulseaudio.enable = true;