From 931b67fdb2c257d7e3a051bf5478f2c2d7af237a Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Tue, 25 May 2021 18:17:39 +0200 Subject: [PATCH] modules: sound: add pipewire configuration --- modules/sound.nix | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/modules/sound.nix b/modules/sound.nix index 5e5ca63..567a974 100644 --- a/modules/sound.nix +++ b/modules/sound.nix @@ -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;