Configure synapse on quasar
This commit is contained in:
parent
66786c2455
commit
0172e6af2b
1 changed files with 32 additions and 2 deletions
|
|
@ -1,4 +1,4 @@
|
|||
{ self, modulesPath, ... }:
|
||||
{ self, config, modulesPath, ... }:
|
||||
{
|
||||
imports = [
|
||||
"${modulesPath}/virtualisation/amazon-image.nix"
|
||||
|
|
@ -7,7 +7,37 @@
|
|||
self.nixosModules.server
|
||||
];
|
||||
|
||||
networking.hostName = "quasar";
|
||||
networking = {
|
||||
hostName = "quasar";
|
||||
domain = "consortium.chat";
|
||||
firewall.allowedTCPPorts = [ 80 443 ];
|
||||
};
|
||||
|
||||
services.postgresql = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
services.caddy = {
|
||||
enable = true;
|
||||
virtualHosts = {
|
||||
"${config.networking.domain}".extraConfig = ''
|
||||
reverse_proxy localhost:8008
|
||||
header Strict-Transport-Security "max-age=63072000; includeSubDomains;"
|
||||
'';
|
||||
"matrix.${config.networking.domain}".extraConfig = ''
|
||||
reverse_proxy /_matrix/* localhost:8008
|
||||
reverse_proxy /_synapse/client/* localhost:8008
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
services.matrix-synapse = {
|
||||
enable = true;
|
||||
settings = {
|
||||
server_name = config.networking.domain;
|
||||
serve_server_wellknown = true;
|
||||
};
|
||||
};
|
||||
|
||||
promptEmoji = "🌟";
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue