From 22cca89c4abaeb836c5aba1be32d8e8776b5aec8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Tue, 7 Nov 2023 23:59:34 -0300 Subject: [PATCH] pipewire: unify config file --- user/home.nix | 1 - user/pipewire.nix | 38 ++++++++++++++++++++++++++++++++++++++ user/rtp-sink.nix | 41 ----------------------------------------- 3 files changed, 38 insertions(+), 42 deletions(-) delete mode 100644 user/rtp-sink.nix diff --git a/user/home.nix b/user/home.nix index 0debcbc..f5f20cc 100644 --- a/user/home.nix +++ b/user/home.nix @@ -17,7 +17,6 @@ ./mpv.nix ./mangohud.nix ./pipewire.nix - ./rtp-sink.nix ./mimeapps.nix ./desktop-entries.nix ./chat.nix diff --git a/user/pipewire.nix b/user/pipewire.nix index 8a2c08c..44d7c12 100644 --- a/user/pipewire.nix +++ b/user/pipewire.nix @@ -39,5 +39,43 @@ ] ''; }; + + xdg.configFile = { + "pipewire/pipewire.conf.d/99-rtp-sink.conf".text = '' + context.modules = [ + { name = libpipewire-module-rtp-sink + args = { + # Make this sink appear as an option in graphical interfaces + media.class = Audio/Sink + node.name = "rtp-sink" + node.description = "RTP" + + #sap.ip = "224.0.0.56" + #sap.port = 9875 + #source.ip = "0.0.0.0" + destination.ip = "192.168.0.102" + destination.port = 4010 + #local.ifname = "eth0" + net.mtu = 320 + #net.ttl = 1 + #net.loop = false + #sess.name = "PipeWire RTP stream" + #audio.format = "S16BE" + audio.rate = 48000 + audio.channels = 2 + audio.position = [ FL FR ] + stream.props = { + node.name = "rtp-sink" + } + } + flags = [ nofail ] + } + ] + ''; + "systemd/user/pipewire.service.d/override.conf".text = '' + [Service] + ExecStartPre=/usr/bin/env sleep 10s + ''; + }; }; } diff --git a/user/rtp-sink.nix b/user/rtp-sink.nix deleted file mode 100644 index c1a51b3..0000000 --- a/user/rtp-sink.nix +++ /dev/null @@ -1,41 +0,0 @@ -{ config, pkgs, lib, ... }: { - config = { - xdg.configFile = { - "pipewire/pipewire.conf.d/99-rtp-sink.conf".text = '' - context.modules = [ - { name = libpipewire-module-rtp-sink - args = { - # Make this sink appear as an option in graphical interfaces - media.class = Audio/Sink - node.name = "rtp-sink" - node.description = "RTP" - - #sap.ip = "224.0.0.56" - #sap.port = 9875 - #source.ip = "0.0.0.0" - destination.ip = "192.168.0.102" - destination.port = 4010 - #local.ifname = "eth0" - net.mtu = 320 - #net.ttl = 1 - #net.loop = false - #sess.name = "PipeWire RTP stream" - #audio.format = "S16BE" - audio.rate = 48000 - audio.channels = 2 - audio.position = [ FL FR ] - stream.props = { - node.name = "rtp-sink" - } - } - flags = [ nofail ] - } - ] - ''; - "systemd/user/pipewire.service.d/override.conf".text = '' - [Service] - ExecStartPre=/usr/bin/env sleep 10s - ''; - }; - }; -}