Configure Matrix host
Co-authored-by: julian <julian@jsts.xyz>
This commit is contained in:
parent
3d8f0fa040
commit
58d529d0ba
7 changed files with 203 additions and 0 deletions
61
config/hosts/matrix/matrix-synapse.nix
Normal file
61
config/hosts/matrix/matrix-synapse.nix
Normal file
|
@ -0,0 +1,61 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
services.matrix-synapse = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
listeners = [
|
||||
{
|
||||
port = 8008;
|
||||
bind_addresses = [
|
||||
"::1"
|
||||
"127.0.0.1"
|
||||
];
|
||||
type = "http";
|
||||
tls = false;
|
||||
x_forwarded = true;
|
||||
|
||||
resources = [
|
||||
{
|
||||
compress = true;
|
||||
names = [ "client" ];
|
||||
}
|
||||
{
|
||||
compress = false;
|
||||
names = [ "federation" ];
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
|
||||
server_name = "hamburg.ccc.de";
|
||||
public_baseurl = "https://matrix.hamburg.ccc.de";
|
||||
|
||||
database = {
|
||||
name = "psycopg2";
|
||||
args.password = "synapse";
|
||||
};
|
||||
|
||||
media_store_path = "/mnt/data/synapse_media_store";
|
||||
max_upload_size = "500M";
|
||||
|
||||
admin_contact = "mailto:yuri+ccchh@nekover.se";
|
||||
};
|
||||
|
||||
extraConfigFiles = [
|
||||
"/secrets/matrix-registration-shared-secret.secret"
|
||||
];
|
||||
};
|
||||
|
||||
deployment.keys = {
|
||||
"matrix-registration-shared-secret.secret" = {
|
||||
keyCommand = [ "pass" "noc/vm-secrets/chaosknoten/matrix/registration-shared-secret" ];
|
||||
destDir = "/secrets";
|
||||
user = "matrix-synapse";
|
||||
group = "matrix-synapse";
|
||||
permissions = "0640";
|
||||
uploadAt = "pre-activation";
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue