From 8610583904ea9a7086022e689ac4d4e18eb0498b Mon Sep 17 00:00:00 2001 From: wo2wz <189177184+wo2wz@users.noreply.github.com> Date: Fri, 19 Sep 2025 16:38:35 -0400 Subject: [PATCH] add mumble to Earthmover --- hosts/Earthmover/default.nix | 3 +- modules/nixos/mumble.nix | 55 ++++++++++++++++++++++++++++++++++++ 2 files changed, 56 insertions(+), 2 deletions(-) create mode 100644 modules/nixos/mumble.nix diff --git a/hosts/Earthmover/default.nix b/hosts/Earthmover/default.nix index 8b7e103..323a4df 100755 --- a/hosts/Earthmover/default.nix +++ b/hosts/Earthmover/default.nix @@ -8,8 +8,7 @@ ../../common/desktop ../../modules/common ../../modules/nixos - - ../../common/kernel.nix + ../../modules/nixos/mumble.nix ]; environment.systemPackages = [ pkgs.kdePackages.krfb ]; diff --git a/modules/nixos/mumble.nix b/modules/nixos/mumble.nix new file mode 100644 index 0000000..eed939e --- /dev/null +++ b/modules/nixos/mumble.nix @@ -0,0 +1,55 @@ +{ config, pkgs, ... }: + +{ + services.murmur = { + enable = true; + environmentFile = "${config.services.murmur.stateDir}/secrets.env"; + openFirewall = true; + autobanAttempts = 3; + }; + environment.systemPackages = [ pkgs.mumble ]; + + services.pipewire.extraConfig.pipewire = { + "97-null-sink"."context.objects" = [ + { + factory = "adapter"; + args = { + "factory.name" = "support.null-audio-sink"; + "node.name" = "Null-Sink"; + "node.description" = "Null Sink"; + "media.class" = "Audio/Sink"; + "audio.position" = "FL,FR"; + }; + } + { + factory = "adapter"; + args = { + "factory.name" = "support.null-audio-sink"; + "node.name" = "Null-Source"; + "node.description" = "Null Source"; + "media.class" = "Audio/Source"; + "audio.position" = "FL,FR"; + }; + } + ]; + + "98-virtual-mic"."context.modules" = [ + { + name = "libpipewire-module-loopback"; + args = { + "audio.position" = "FL,FR"; + "node.description" = "Mumble as Microphone"; + "capture.props" = { + # Mumble's output node name. + "node.target" = "Mumble"; + "node.passive" = true; + }; + "playback.props" = { + "node.name" = "Virtual-Mumble-Microphone"; + "media.class" = "Audio/Source"; + }; + }; + } + ]; + }; +} \ No newline at end of file