From 733a9c8e70880089c3a7035d3b6fd4098620824e Mon Sep 17 00:00:00 2001 From: Mike Cugini Date: Thu, 16 Feb 2023 10:28:25 -0500 Subject: [PATCH] setup pantalaimon for matterbridge --- nixos_configs/bridge.nix | 41 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 39 insertions(+), 2 deletions(-) diff --git a/nixos_configs/bridge.nix b/nixos_configs/bridge.nix index 5df611a..6c7773c 100644 --- a/nixos_configs/bridge.nix +++ b/nixos_configs/bridge.nix @@ -7,7 +7,13 @@ in { "${toString modulesPath}/virtualisation/digital-ocean-image.nix" ]; - environment.systemPackages = [ pkgs.jq ]; + nixpkgs.config = { + packageOverrides = pkgs: { + pantalaimon = pkgs.pantalaimon.override { enableDbusUi = false; }; + }; + }; + + environment.systemPackages = [ pkgs.jq pkgs.pantalaimon pkgs.olm ]; services.openssh.enable = true; networking.firewall.allowedTCPPorts = [ 22 80 443 ]; @@ -22,6 +28,37 @@ in { isSystemUser = true; }; + users.users.pantalaimon = { + createHome = true; + isNormalUser = true; + }; + + systemd.services.pantalaimon = let + pantalaimon-config-file = pkgs.writeText "pantalaimon.conf" '' +[Default] +LogLevel = Debug + +[local-matrix] +Homeserver = https://matrix.waffle.farm +ListenAddress = localhost +ListenPort = 8009 +Notifications = off +UseKeyring = no +IgnoreVerification = True +SSL=false + ''; + in { + enable = true; + description = "pantalaimon daemon"; + wantedBy = [ "multi-user.target" ]; + serviceConfig = { + Type = "simple"; + ExecStart = "${pkgs.pantalaimon}/bin/pantalaimon -c ${pantalaimon-config-file} --data-path /home/pantalaimon "; + User = "pantalaimon"; + Restart = "always"; + }; + }; + nixpkgs.overlays = [ (final: prev: { matterbridge = prev.matterbridge.overrideAttrs (oldAttrs: rec { @@ -99,7 +136,7 @@ RemoteNickFormat="{NICK} [{PROTOCOL}]: " PreserveThreading=true [matrix.wafflefarm] -Server="https://matrix.waffle.farm" +Server="http://localhost:8009" Login="${secrets.matterbridge.matrix.username}" Password="${secrets.matterbridge.matrix.password}" RemoteNickFormat="{NICK} [{PROTOCOL}]: "