matrix: fix continuwuity module
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
service_configs,
|
||||
lib,
|
||||
@@ -7,21 +6,19 @@
|
||||
}:
|
||||
{
|
||||
imports = [
|
||||
(lib.serviceMountWithZpool "matrix-conduit" service_configs.zpool_ssds [
|
||||
(lib.serviceMountWithZpool "continuwuity" service_configs.zpool_ssds [
|
||||
service_configs.matrix.dataDir
|
||||
])
|
||||
];
|
||||
|
||||
services.matrix-conduit = {
|
||||
services.matrix-continuwuity = {
|
||||
enable = true;
|
||||
package = pkgs.matrix-continuwuity;
|
||||
|
||||
settings.global = {
|
||||
port = service_configs.ports.matrix;
|
||||
port = [ service_configs.ports.matrix ];
|
||||
server_name = service_configs.https.domain;
|
||||
database_backend = "rocksdb";
|
||||
allow_registration = true;
|
||||
registration_token = builtins.readFile ../secrets/matrix_reg_token;
|
||||
registration_token_file = ../secrets/matrix_reg_token;
|
||||
|
||||
new_user_displayname_suffix = "";
|
||||
|
||||
@@ -32,8 +29,9 @@
|
||||
"envs.net"
|
||||
];
|
||||
|
||||
# without this, conduit fails to start
|
||||
address = "0.0.0.0";
|
||||
address = [
|
||||
"0.0.0.0"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
@@ -41,7 +39,7 @@
|
||||
header /.well-known/matrix/* Content-Type application/json
|
||||
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/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 = ''
|
||||
@@ -53,7 +51,7 @@
|
||||
config.services.caddy.virtualHosts."${service_configs.matrix.domain}".extraConfig;
|
||||
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user