matrix: fix continuwuity module

This commit is contained in:
2026-02-10 13:54:22 -05:00
parent 3187130cd3
commit 4f71f61c4b
2 changed files with 10 additions and 12 deletions

View File

@@ -171,7 +171,7 @@
}; };
matrix = { matrix = {
dataDir = "/var/lib/private/matrix-conduit"; dataDir = "/var/lib/continuwuity";
domain = "matrix.${https.domain}"; domain = "matrix.${https.domain}";
}; };

View File

@@ -1,5 +1,4 @@
{ {
pkgs,
config, config,
service_configs, service_configs,
lib, lib,
@@ -7,21 +6,19 @@
}: }:
{ {
imports = [ imports = [
(lib.serviceMountWithZpool "matrix-conduit" service_configs.zpool_ssds [ (lib.serviceMountWithZpool "continuwuity" service_configs.zpool_ssds [
service_configs.matrix.dataDir service_configs.matrix.dataDir
]) ])
]; ];
services.matrix-conduit = { services.matrix-continuwuity = {
enable = true; enable = true;
package = pkgs.matrix-continuwuity;
settings.global = { settings.global = {
port = service_configs.ports.matrix; port = [ service_configs.ports.matrix ];
server_name = service_configs.https.domain; server_name = service_configs.https.domain;
database_backend = "rocksdb";
allow_registration = true; allow_registration = true;
registration_token = builtins.readFile ../secrets/matrix_reg_token; registration_token_file = ../secrets/matrix_reg_token;
new_user_displayname_suffix = ""; new_user_displayname_suffix = "";
@@ -32,8 +29,9 @@
"envs.net" "envs.net"
]; ];
# without this, conduit fails to start address = [
address = "0.0.0.0"; "0.0.0.0"
];
}; };
}; };
@@ -41,7 +39,7 @@
header /.well-known/matrix/* Content-Type application/json header /.well-known/matrix/* Content-Type application/json
header /.well-known/matrix/* Access-Control-Allow-Origin * header /.well-known/matrix/* Access-Control-Allow-Origin *
respond /.well-known/matrix/server `{"m.server": "${service_configs.matrix.domain}:${builtins.toString service_configs.ports.https}"}` respond /.well-known/matrix/server `{"m.server": "${service_configs.matrix.domain}:${builtins.toString service_configs.ports.https}"}`
respond /.well-known/matrix/client `{"m.server":{"base_url":"https://${service_configs.matrix.domain}"},"m.homeserver":{"base_url":"https://${service_configs.matrix.domain}"},"org.matrix.msc3575.proxy":{"base_url":"https://${config.services.matrix-conduit.settings.global.server_name}"}}` respond /.well-known/matrix/client `{"m.server":{"base_url":"https://${service_configs.matrix.domain}"},"m.homeserver":{"base_url":"https://${service_configs.matrix.domain}"},"org.matrix.msc3575.proxy":{"base_url":"https://${config.services.matrix-continuwuity.settings.global.server_name}"}}`
''; '';
services.caddy.virtualHosts."${service_configs.matrix.domain}".extraConfig = '' services.caddy.virtualHosts."${service_configs.matrix.domain}".extraConfig = ''
@@ -53,7 +51,7 @@
config.services.caddy.virtualHosts."${service_configs.matrix.domain}".extraConfig; config.services.caddy.virtualHosts."${service_configs.matrix.domain}".extraConfig;
systemd.tmpfiles.rules = [ systemd.tmpfiles.rules = [
"Z ${service_configs.matrix.dataDir} 0770 ${config.systemd.services.conduit.serviceConfig.User} ${config.systemd.services.conduit.serviceConfig.User}" "Z ${service_configs.matrix.dataDir} 0770 ${config.services.matrix-continuwuity.user} ${config.services.matrix-continuwuity.group}"
]; ];
# for federation # for federation