aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/hostclass/matrix_server39
-rw-r--r--scripts/hostclass/pkg_repository2
2 files changed, 40 insertions, 1 deletions
diff --git a/scripts/hostclass/matrix_server b/scripts/hostclass/matrix_server
new file mode 100644
index 0000000..df22c3b
--- /dev/null
+++ b/scripts/hostclass/matrix_server
@@ -0,0 +1,39 @@
+#!/bin/sh
+
+: ${synapse_signing_key:='changeme'}
+: ${synapse_macaroon_secret_key:='changeme'}
+: ${synapse_form_secret:='changeme'}
+: ${synapse_ldap_password:='changeme'}
+: ${synapse_domain:="$email_domain"}
+: ${synapse_public_fqdn:="$fqdn"}
+: ${synapse_local_client_port:='8008'}
+: ${synapse_local_federation_port:='8009'}
+: ${synapse_client_port:='8443'}
+: ${synapse_federation_port:='8448'}
+: ${synapse_mail_from:="Matrix <matrix-noreply@${email_domain}>"}
+: ${synapse_username:='s-synapse'}
+: ${synapse_local_media_retention:='365d'}
+: ${synapse_remote_media_retention:='90d'}
+: ${synapse_upload_sizelimit:='104857600'} # 100 MB
+: ${synapse_turn_host:="$turn_domain"}
+: ${synapse_turn_secret:="$turn_secret"}
+: ${synapse_access_role:='matrix-access'}
+
+synapse_db_dir=/var/db/matrix-synapse
+synapse_conf_dir=/usr/local/etc/matrix-synapse
+synapse_local_user=synapse
+
+# Install required packages.
+pkg install -y \
+ py${python_version}-matrix-synapse \
+ py${python_version}-matrix-synapse-ldap3 \
+ nginx
+
+# Generate synapse configuration.
+install_template -o "$synapse_local_user" -g "$synapse_local_user" -m 0600 \
+ "${synapse_conf_dir}/homeserver.yaml" \
+ "${synapse_conf_dir}/${synapse_domain}.signing.key"
+
+install_file -o "$synapse_local_user" -g "$synapse_local_user" -m 0644 \
+ "${synapse_conf_dir}/log.config"
+
diff --git a/scripts/hostclass/pkg_repository b/scripts/hostclass/pkg_repository
index 241ee0e..83a26aa 100644
--- a/scripts/hostclass/pkg_repository
+++ b/scripts/hostclass/pkg_repository
@@ -3,7 +3,7 @@
: ${poudriere_versions:='14.2-RELEASE'}
: ${poudriere_jobs:="$nproc"}
: ${poudriere_dataset:="${state_dataset:-zroot}"}
-: ${poudriere_make_jobs_number:='8'}
+: ${poudriere_make_jobs_number:='4'}
: ${poudriere_priority_boost:='gcc* llvm* rust'}
: ${poudriere_allow_make_jobs_packages:='ImageMagick* bitwarden-cli cargo-c *chromium* cmake cmake-core digikam eclipse electron* ffmpeg firefox thunderbird gcc* gnutls gtk3* icu libreoffice* llvm* mongodb* mysql*-client mysql*-server node* openjdk* openssl pkg postgresql* qt*-webengine rust webkit* wine vaultwarden'}
: ${poudriere_ccache_size:='50.0G'}