M systems/hosts/proxy/haproxy.conf => systems/hosts/proxy/haproxy.conf +7 -0
@@ 37,6 37,10 @@ frontend http-in
use_backend be_liljamocom_webfinger if host_liljamocom liljamocom_webfinger
use_backend be_liljamocom if host_liljamocom
+ acl host_lothloriensocial req.hdr(Host) lothlorien.social
+ acl lothlorien_social_matrix path_beg /_matrix
+ use_backend be_lothlorien_matrix if host_lothloriensocial lothlorien_social_matrix
+
acl host_alderaanfi req.hdr(Host) alderaan.fi
acl alderaanfi_matrix path_beg /_matrix
use_backend be_alderaan_matrix if host_alderaanfi alderaanfi_matrix
@@ 91,6 95,9 @@ backend be_akkoma
backend be_akkomamedia
server akkoma 10.1.2.17:4000
+backend be_lothlorien_matrix
+ server conduwuit 10.1.2.17:6167
+
# liljamo.dev
backend be_liljamodev
server liljamodev 10.1.1.10:8110
M systems/hosts/social/default.nix => systems/hosts/social/default.nix +24 -2
@@ 1,11 1,14 @@
{
config,
+ inputs,
pkgs,
...
}: let
+ domain = "lothlorien.social";
akkomaPort = 4000;
+ conduitPort = 6167;
in {
- networking.firewall.allowedTCPPorts = [akkomaPort];
+ networking.firewall.allowedTCPPorts = [akkomaPort conduitPort];
services.postgresql = {
package = pkgs.postgresql_16;
@@ 45,11 48,30 @@ in {
"Pleroma.Web.Endpoint".http.ip = "0.0.0.0";
"Pleroma.Web.Endpoint".http.port = akkomaPort;
- "Pleroma.Web.Endpoint".url.host = "lothlorien.social";
+ "Pleroma.Web.Endpoint".url.host = domain;
"Pleroma.Web.Endpoint".url.port = 443;
};
};
};
+ services.matrix-conduit = {
+ package = inputs.nixpkgs-unstable.legacyPackages.${pkgs.system}.conduwuit;
+ enable = true;
+ # https://github.com/girlbossceo/conduwuit/blob/main/conduwuit-example.toml
+ settings.global = {
+ address = "0.0.0.0";
+ allow_check_for_updates = true;
+ allow_encryption = true;
+ allow_federation = true;
+ allow_registration = false;
+ database_backend = "rocksdb";
+ max_request_size = 50000000;
+ new_user_displayname_suffix = "";
+ port = conduitPort;
+ server_name = domain;
+ trusted_servers = ["matrix.org"];
+ };
+ };
+
system.stateVersion = "24.05";
}