nix-config/features/services/synapse-matrix.nix

94 lines
1.6 KiB
Nix
Raw Normal View History

2024-07-19 13:59:34 +02:00
{
pkgs,
config,
lib,
...
}:
let
2024-07-19 17:19:11 +02:00
baseUrl = "https://talk.hypervirtual.world";
2024-07-19 13:59:34 +02:00
in
2024-07-15 16:27:23 +02:00
{
networking.domain = "hypervirtual.world";
2024-08-12 15:56:45 +02:00
sops.secrets.matrix_data = {
2024-07-19 13:59:34 +02:00
format = "yaml";
2024-07-19 17:16:56 +02:00
owner = "matrix-synapse";
2024-07-19 13:59:34 +02:00
};
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 = {
server_name = "hypervirtual.world";
2024-07-19 13:59:34 +02:00
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"
2024-07-19 20:20:07 +02:00
"0.0.0.0"
];
2024-07-19 14:04:25 +02:00
type = "http";
tls = false;
x_forwarded = true;
resources = [
{
names = [
"client"
"federation"
"metrics"
2024-07-19 14:04:25 +02:00
];
compress = true;
}
];
}
{
port = 9000;
type = "metrics";
2024-07-22 11:27:52 +02:00
tls = false;
2024-07-22 11:07:37 +02:00
bind_addresses = [
"::1"
"0.0.0.0"
];
2024-07-22 11:23:30 +02:00
resources = [ ];
}
2024-07-19 14:04:25 +02:00
];
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
2024-08-12 15:56:45 +02:00
extraConfigFiles = [ "/run/secrets/matrix_data" ];
2024-07-19 13:59:34 +02:00
};
/*
services.mautrix-discord = {
enable = true;
environmentFile = "";
settings = {
homeserver = {
address = "http://localhost:8008";
domain = "hypervirtual.world";
};
appservice = {
provisioning.enabled = false;
id = "discord";
public = {
};
database = "";
};
};
};
*/
2024-07-15 16:27:23 +02:00
}