2024-07-19 13:59:34 +02:00
|
|
|
{
|
|
|
|
pkgs,
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
...
|
|
|
|
}:
|
2024-07-15 16:27:23 +02:00
|
|
|
#TODO: implement
|
2024-07-19 13:59:34 +02:00
|
|
|
let
|
|
|
|
baseUrl = "talk.hypervirtual.world";
|
|
|
|
in
|
2024-07-15 16:27:23 +02:00
|
|
|
{
|
2024-07-19 13:59:34 +02:00
|
|
|
|
|
|
|
sops.secrets.matrix-shared-secret = {
|
|
|
|
sopsFile = ../secrets/matrix.yaml;
|
|
|
|
format = "yaml";
|
|
|
|
};
|
|
|
|
|
2024-07-18 17:17:01 +02:00
|
|
|
services.matrix-synapse = {
|
|
|
|
enable = true;
|
2024-07-18 22:40:20 +02:00
|
|
|
|
2024-07-18 17:17:01 +02:00
|
|
|
settings = {
|
2024-07-19 13:59:34 +02:00
|
|
|
serverName = baseUrl;
|
|
|
|
public_baseurl = baseUrl;
|
2024-07-19 13:30:13 +02:00
|
|
|
enable_registration = false;
|
2024-07-19 14:04:25 +02:00
|
|
|
listeners = [
|
|
|
|
{
|
|
|
|
port = 8008;
|
|
|
|
bind_addresses = [ "::1" ];
|
|
|
|
type = "http";
|
|
|
|
tls = false;
|
|
|
|
x_forwarded = true;
|
|
|
|
resources = [
|
|
|
|
{
|
|
|
|
names = [
|
|
|
|
"client"
|
|
|
|
"federation"
|
|
|
|
];
|
|
|
|
compress = true;
|
|
|
|
}
|
|
|
|
];
|
|
|
|
}
|
|
|
|
];
|
2024-07-18 17:17:01 +02:00
|
|
|
};
|
|
|
|
|
2024-07-18 22:40:20 +02:00
|
|
|
extras = [
|
|
|
|
"systemd"
|
|
|
|
"postgres"
|
|
|
|
"url-preview"
|
|
|
|
"user-search"
|
|
|
|
];
|
2024-07-19 13:59:34 +02:00
|
|
|
|
|
|
|
extraConfigFiles = [ "/run/secrets/matrix-shared-secret" ];
|
|
|
|
|
|
|
|
};
|
|
|
|
|
2024-07-19 14:01:33 +02:00
|
|
|
services.postgresql = {
|
2024-07-19 13:59:34 +02:00
|
|
|
enable = true;
|
|
|
|
package = pkgs.postgresql_15;
|
2024-07-18 17:17:01 +02:00
|
|
|
};
|
2024-07-15 16:27:23 +02:00
|
|
|
}
|