Setup matrix on apogee
This commit is contained in:
parent
6c2f1637ad
commit
1b04cd6f94
3 changed files with 37 additions and 1 deletions
28
hosts/apogee/matrix.nix
Normal file
28
hosts/apogee/matrix.nix
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
{ config, ... }:
|
||||
let domain = "leaf.ninja";
|
||||
in {
|
||||
age.secrets.synapse-secrets-config.file =
|
||||
./secrets/synapse-secrets-config.age;
|
||||
|
||||
services.matrix-synapse = {
|
||||
enable = true;
|
||||
extraConfigFiles = [ config.age.secrets.synapse-secrets-config.path ];
|
||||
settings = {
|
||||
server_name = domain;
|
||||
database_type = "psycopg2";
|
||||
database_args.database = "matrix-synapse";
|
||||
};
|
||||
};
|
||||
|
||||
networking.firewall.allowedTCPPorts = [
|
||||
8448 # Matrix federation
|
||||
];
|
||||
|
||||
services.caddy = {
|
||||
enable = true;
|
||||
virtualHosts."matrix.${domain}".extraConfig = ''
|
||||
reverse_proxy /_matrix/* localhost:8008
|
||||
reverse_proxy /_synapse/client/* localhost:8008
|
||||
'';
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue