modules: sound: add pipewire configuration

This commit is contained in:
Bruno BELANYI 2021-05-25 18:17:39 +02:00
parent 941913e213
commit 10434bdbfc

View file

@ -6,6 +6,10 @@ in
options.my.modules.sound = with lib; { options.my.modules.sound = with lib; {
enable = mkEnableOption "sound configuration"; enable = mkEnableOption "sound configuration";
pipewire = {
enable = mkEnableOption "pipewire configuration";
};
pulse = { pulse = {
enable = mkEnableOption "pulseaudio configuration"; enable = mkEnableOption "pulseaudio configuration";
}; };
@ -17,6 +21,32 @@ in
sound.enable = true; 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 # Pulseaudio setup
(lib.mkIf cfg.pulse.enable { (lib.mkIf cfg.pulse.enable {
hardware.pulseaudio.enable = true; hardware.pulseaudio.enable = true;