From 00c9e35779cbb298d6395a6e2c2534007a92976f Mon Sep 17 00:00:00 2001 From: Preston Pan Date: Fri, 21 Mar 2025 04:52:46 -0700 Subject: add a ton of VPS upgrades; update website; live life --- nix/data/deploy-matterbridge.sh | 25 +++++++++++++++++++++++++ nix/data/matterbridge.toml | 25 +++++++++++++++++++++++++ nix/data/motd.txt | 8 ++++++++ 3 files changed, 58 insertions(+) create mode 100755 nix/data/deploy-matterbridge.sh create mode 100644 nix/data/matterbridge.toml create mode 100644 nix/data/motd.txt (limited to 'nix/data') diff --git a/nix/data/deploy-matterbridge.sh b/nix/data/deploy-matterbridge.sh new file mode 100755 index 0000000..a0758ec --- /dev/null +++ b/nix/data/deploy-matterbridge.sh @@ -0,0 +1,25 @@ +set -e # Exit on error + +# Ensure required environment variables are set +#: "${MATTERBRIDGE_DISCORD_TOKEN:?Need to set MATTERBRIDGE_DISCORD_TOKEN}" +: "${MATTERBRIDGE_MATRIX_PASS:?Need to set MATTERBRIDGE_MATRIX_PASS}" + +# Define paths +TEMPLATE_CONFIG="matterbridge.toml" +GENERATED_CONFIG="matterbridge.built.toml" +REMOTE_SERVER="root@nullring.xyz" +REMOTE_PATH="/etc/matterbridge.toml" + +# Generate config file +sed "s|\${MATTERBRIDGE_MATRIX_PASS}|$MATTERBRIDGE_MATRIX_PASS|g" $TEMPLATE_CONFIG > $GENERATED_CONFIG + +# Securely transfer to server +scp "$GENERATED_CONFIG" "$REMOTE_SERVER:$REMOTE_PATH" + +# Restart Matterbridge service +ssh "$REMOTE_SERVER" "sudo systemctl restart matterbridge" + +# delete config file with secrets from repo +shred -u "$GENERATED_CONFIG" + +echo "✅ Matterbridge config deployed successfully!" diff --git a/nix/data/matterbridge.toml b/nix/data/matterbridge.toml new file mode 100644 index 0000000..aebb8c2 --- /dev/null +++ b/nix/data/matterbridge.toml @@ -0,0 +1,25 @@ +[matrix.mymatrix] +Server="https://matrix.ret2pop.net" +Login="bridge" +Password="${MATTERBRIDGE_MATRIX_PASS}" +RemoteNickFormat="[{PROTOCOL}] <{NICK}> " +NoHomeServerSuffix=true + +[irc.myirc] +Server="nullring.xyz:6697" +Nick="bridge" +RemoteNickFormat="[{PROTOCOL}] <{NICK}> " +UseTLS=true +SkipTLSVerify=true + +[[gateway]] +name="gateway1" +enable=true + +[[gateway.inout]] +account="matrix.mymatrix" +channel="!BQZli4UPBNC5w6ntXu:matrix.ret2pop.net" + +[[gateway.inout]] +account="irc.myirc" +channel="#nullring" \ No newline at end of file diff --git a/nix/data/motd.txt b/nix/data/motd.txt new file mode 100644 index 0000000..ffcd31f --- /dev/null +++ b/nix/data/motd.txt @@ -0,0 +1,8 @@ +Welcome to the NullRing experience! +The main channel is #nullring; we're glad to have you! + +Rules: +1. Don't be annoying. +2. No illegal content. +And if you're here to have constructive, philisophical and theoretical +conversations, this is the place for you! -- cgit v1.3