setup pantalaimon for matterbridge

This commit is contained in:
Mike Cugini 2023-02-16 10:28:25 -05:00
parent 5fb127e8fe
commit 733a9c8e70

View File

@ -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}]: "