diff options
| author | Preston Pan <ret2pop@gmail.com> | 2025-03-21 04:52:46 -0700 |
|---|---|---|
| committer | Preston Pan <ret2pop@gmail.com> | 2025-03-21 04:52:46 -0700 |
| commit | 00c9e35779cbb298d6395a6e2c2534007a92976f (patch) | |
| tree | e5bfc2d375b331ba6b664ddf6152f51bfcc900df /nix/data | |
| parent | 2a4c959ef00fea785633afe44be0af77d6441a4b (diff) | |
add a ton of VPS upgrades; update website; live life
Diffstat (limited to 'nix/data')
| -rwxr-xr-x | nix/data/deploy-matterbridge.sh | 25 | ||||
| -rw-r--r-- | nix/data/matterbridge.toml | 25 | ||||
| -rw-r--r-- | nix/data/motd.txt | 8 |
3 files changed, 58 insertions, 0 deletions
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! |
