mirror of
https://github.com/kittywitch/nixfiles.git
synced 2026-02-09 04:19:19 -08:00
feat: matrix appservices and weechat setup
This commit is contained in:
parent
468c9bc811
commit
4b0a194abb
37 changed files with 850 additions and 334 deletions
29
packages/mautrix-slack.nix
Normal file
29
packages/mautrix-slack.nix
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
{ lib, buildGoModule, fetchFromGitHub, olm, libsignal-ffi }:
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "mautrix-slack";
|
||||
version = "2024-05-01";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "mautrix";
|
||||
repo = "slack";
|
||||
rev = "75d2ffd88b6f1d097697fab363099ed7d37fff6f";
|
||||
hash = "sha256-l0pZPp11VJ7xP0uuctjOEZHCDnS4OAbxMRkcNQLbMzs=";
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
olm
|
||||
];
|
||||
|
||||
vendorHash = "sha256-FL0wObZIvGV9V7pLmrxTILQ/TGEMSH8/2wFPlu6idcA=";
|
||||
|
||||
doCheck = false;
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/mautrix/slack";
|
||||
description = "A Matrix-Slack puppeting bridge";
|
||||
license = licenses.agpl3Plus;
|
||||
maintainers = with maintainers; [ kittywitch ];
|
||||
mainProgram = "mautrix-slack";
|
||||
};
|
||||
}
|
||||
|
|
@ -2,13 +2,14 @@
|
|||
set -eu
|
||||
set -o pipefail
|
||||
|
||||
read -p "Enter the homeserver name, without https:// prefix: " HOMESERVER
|
||||
read -sp "Enter the admin user token required: " API_ID
|
||||
# Provide $HOMESERVER and $API_ID into the program via environment, or uncomment the two below lines:
|
||||
#read -p "Enter the homeserver name, without https:// prefix: " HOMESERVER
|
||||
#read -sp "Enter the admin user token required: " API_ID
|
||||
|
||||
TEMPDIR=$(mktemp -d)
|
||||
|
||||
echo -n "Starting synapse, just to make sure it is online for these requests"
|
||||
systemctl start matrix-synaps
|
||||
systemctl start matrix-synapse
|
||||
sleep 5
|
||||
|
||||
echo -n "Collecting required room data"
|
||||
|
|
@ -36,11 +37,10 @@ for room_id in $rooms_to_clean; do
|
|||
curl --header "Authorization: Bearer ${API_ID}" -X POST -H "Content-Type: application/json" -d "{ \"delete_local_events\": true, \"purge_up_to_ts\": $ts }" "https://${HOMESERVER}/_synapse/admin/v1/purge_history/\${room_id}"
|
||||
don
|
||||
|
||||
sudo -u matrix-synapse synapse_auto_compressor -p "postgresql://matrix-synapse?user=matrix-synapse&host=/var/run/postgresql/" -c 500 -n 100
|
||||
|
||||
echo -n "Last optimization steps, database optimization, shutting down Synapse"
|
||||
systemctl stop matrix-synaps
|
||||
|
||||
sudo -u matrix-synapse synapse_auto_compressor -p "postgresql://matrix-synapse?user=matrix-synapse&host=/var/run/postgresql/" -c 500 -n 100
|
||||
sudo -u postgres psql matrix-synapse -c "REINDEX (VERBOSE) DATABASE \"matrix-synapse\";"
|
||||
sudo -u postgres psql -c "VACUUM FULL VERBOSE;"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue