From 7b097f84e99c2c1d84d1b5e8c83b10fd3aaff499 Mon Sep 17 00:00:00 2001 From: coolneng Date: Mon, 22 Mar 2021 16:27:03 +0100 Subject: [PATCH] Replace Pulseaudio with Pipewire --- modules/audio.nix | 14 ++++++++++---- modules/gui.nix | 2 -- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/modules/audio.nix b/modules/audio.nix index 724d88c..e3729b7 100644 --- a/modules/audio.nix +++ b/modules/audio.nix @@ -8,14 +8,20 @@ in { # Enable ALSA sound.enable = true; - # Configure PulseAudio with mopidy tweaks - hardware.pulseaudio = { + # Configure pipewire as sound server + services.pipewire = { enable = true; - tcp = { + alsa = { enable = true; - anonymousClients.allowedIpRanges = [ "127.0.0.1" ]; + support32Bit = true; }; + pulse.enable = true; + jack.enable = true; + media-session.enable = true; + config.pipewire-pulse."context.modules"."libpipewire-module-protocol-pulse"."args"."server.address" = + [ "unix:native" "tcp:4713" ]; }; + security.rtkit.enable = true; # Set up Mopidy services.mopidy = { diff --git a/modules/gui.nix b/modules/gui.nix index 71b6e9b..d47edaf 100644 --- a/modules/gui.nix +++ b/modules/gui.nix @@ -123,8 +123,6 @@ in { programs.browserpass.enable = true; # Enable WebRTC screensharing - services.pipewire.enable = true; - xdg.portal = { enable = true; extraPortals = with pkgs; [ xdg-desktop-portal-wlr ];