dot

NixOS dotfiles
git clone https://git.echoz.io/dot.git
Log | Files | Refs

commit 43cb2c670a73267b821ddac3c3fdf5ab41c2d15f
parent 4650a561f2b729be3ac8be652be60dc1a8b573c2
Author: Chris <chris@echoz.io>
Date:   Wed,  8 Oct 2025 21:35:23 +0200

fix(pipewire): unfuck and make it behave sanely

Diffstat:
Mhosts/ws/pipewire.nix | 36+++++++++++++++++++++++++++++++++++-
1 file changed, 35 insertions(+), 1 deletion(-)

diff --git a/hosts/ws/pipewire.nix b/hosts/ws/pipewire.nix @@ -4,17 +4,44 @@ }: { services.pipewire.wireplumber.extraConfig = { + general = { + "wireplumber.settings" = { + "device.restore-profile" = false; + "device.restore-routes" = false; + "device.routes.default-sink-volume" = 1.0; + "device.routes.default-source-volume" = 1.0; + }; + + "wireplumber.profiles".main = { + "hooks.device.profile.state" = "disabled"; + "hooks.device.routes.state" = "disabled"; + "hooks.default-nodes.state" = "disabled"; + "hooks.stream.state" = "disabled"; + }; + }; + devices."monitor.alsa.rules" = [ { matches = lib.singleton { + "device.description" = "DENON DJ MC7000"; + }; + actions.update-props = { + "device.profile" = "pro-audio"; + }; + } + { + matches = lib.singleton { "alsa.card_name" = "Xonar STX"; "media.class" = "Audio/Sink"; }; actions.update-props = { "node.description" = "Desktop"; "node.nick" = "Desktop"; + "priority.session" = 8000; + "priority.driver" = 8000; }; } + { matches = lib.singleton { "alsa.card_name" = "Xonar STX"; @@ -30,6 +57,8 @@ actions.update-props = { "node.description" = "Voice"; "node.nick" = "Voice"; + "priority.session" = 9000; + "priority.driver" = 9000; }; } { @@ -37,7 +66,7 @@ "alsa.card_name" = "RODE NT-USB"; "media.class" = "Audio/Sink"; }; - action.update-props."node.disabled" = true; + actions.update-props."node.disabled" = true; } { matches = lib.singleton { @@ -67,6 +96,7 @@ "wireplumber.profiles".main."custom.loopback" = "required"; }; }; + services.pipewire.wireplumber.extraScripts."loopback.lua" = '' masterOutput = LocalModule("libpipewire-module-loopback", [[ audio.position = [ FL FR ] @@ -78,6 +108,8 @@ audio.rate = 44100 audio.channels = 2 audio.position = [ FL FR ] + priority.session = 6000 + priority.driver = 6000 } playback.props = { node.name = "playback.master" @@ -100,6 +132,8 @@ audio.rate = 44100 audio.channels = 2 audio.position = [ FL FR ] + priority.session = 7000 + priority.driver = 7000 } playback.props = { node.name = "playback.headphones"