From d8d8b55e7dccfe10e99d2f4ed968fa8acaef9b78 Mon Sep 17 00:00:00 2001 From: K900 Date: Mon, 27 Feb 2023 02:51:24 +0300 Subject: [PATCH] nixos/murmur: expose dbus --- nixos/modules/services/networking/murmur.nix | 30 ++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/nixos/modules/services/networking/murmur.nix b/nixos/modules/services/networking/murmur.nix index 32498ca25ea..9ec4f57ca43 100644 --- a/nixos/modules/services/networking/murmur.nix +++ b/nixos/modules/services/networking/murmur.nix @@ -42,6 +42,8 @@ let ${if cfg.sslKey == "" then "" else "sslKey="+cfg.sslKey} ${if cfg.sslCa == "" then "" else "sslCA="+cfg.sslCa} + ${lib.optionalString (cfg.dbus != null) "dbus=${cfg.dbus}"} + ${cfg.extraConfig} ''; in @@ -282,6 +284,12 @@ in `murmur` is running. ''; }; + + dbus = mkOption { + type = types.enum [ null "session" "system" ]; + default = null; + description = lib.mdDoc "Enable D-Bus remote control. Set to the bus you want Murmur to connect to."; + }; }; }; @@ -325,5 +333,27 @@ in Group = "murmur"; }; }; + + # currently not included in upstream package, addition requested at + # https://github.com/mumble-voip/mumble/issues/6078 + services.dbus.packages = mkIf (cfg.dbus == "system") [(pkgs.writeTextFile { + name = "murmur-dbus-policy"; + text = '' + + + + + + + + + + + + ''; + destination = "/share/dbus-1/system.d/murmur.conf"; + })]; }; }