This commit is contained in:
parent
6e3b07a67f
commit
2d85d61793
|
@ -10,7 +10,10 @@ let
|
||||||
};
|
};
|
||||||
k8s_proxy = proxy "http://10.42.42.150:8000/";
|
k8s_proxy = proxy "http://10.42.42.150:8000/";
|
||||||
clientConfig = {
|
clientConfig = {
|
||||||
"m.homeserver".base_url = "https://chat.meowy.tech";
|
"m.homeserver" = {
|
||||||
|
base_url = "https://chat.meowy.tech";
|
||||||
|
server_name = "meowy.tech";
|
||||||
|
};
|
||||||
"m.identity_server" = { };
|
"m.identity_server" = { };
|
||||||
};
|
};
|
||||||
serverConfig."m.server" = "chat.meowy.tech:443";
|
serverConfig."m.server" = "chat.meowy.tech:443";
|
||||||
|
@ -57,6 +60,10 @@ in
|
||||||
virtualHosts."meowy.tech" = {
|
virtualHosts."meowy.tech" = {
|
||||||
enableACME = true;
|
enableACME = true;
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
|
locations."/".extraConfig = ''
|
||||||
|
add_header Content-Type 'text/html; charset=UTF-8';
|
||||||
|
return 200 meow;
|
||||||
|
'';
|
||||||
locations."= /.well-known/matrix/client".extraConfig = mkWellKnown clientConfig;
|
locations."= /.well-known/matrix/client".extraConfig = mkWellKnown clientConfig;
|
||||||
locations."= /.well-known/matrix/server".extraConfig = mkWellKnown serverConfig;
|
locations."= /.well-known/matrix/server".extraConfig = mkWellKnown serverConfig;
|
||||||
};
|
};
|
||||||
|
@ -64,11 +71,28 @@ in
|
||||||
enableACME = true;
|
enableACME = true;
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
locations."/".extraConfig = ''
|
locations."/".extraConfig = ''
|
||||||
return 404;
|
return 307 https://element.chat.meowy.tech;
|
||||||
'';
|
'';
|
||||||
locations."/_matrix".proxyPass = "http://synapse.olympus:8008";
|
locations."/_matrix".proxyPass = "http://synapse.olympus:8008";
|
||||||
locations."/_synapse/client".proxyPass = "http://synapse.olympus:8008";
|
locations."/_synapse/client".proxyPass = "http://synapse.olympus:8008";
|
||||||
};
|
};
|
||||||
|
virtualHosts."element.chat.meowy.tech" = {
|
||||||
|
enableACME = true;
|
||||||
|
forceSSL = true;
|
||||||
|
|
||||||
|
root = pkgs.element-web.override {
|
||||||
|
conf = {
|
||||||
|
default_server_config = clientConfig;
|
||||||
|
show_labs_settings = true;
|
||||||
|
brand = "chat.meowy.tech";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
virtualHosts."admin.chat.meowy.tech" = {
|
||||||
|
enableACME = true;
|
||||||
|
forceSSL = true;
|
||||||
|
root = pkgs.synapse-admin;
|
||||||
|
};
|
||||||
|
|
||||||
# Kubernetes endpoints
|
# Kubernetes endpoints
|
||||||
virtualHosts."0x76.dev" = k8s_proxy;
|
virtualHosts."0x76.dev" = k8s_proxy;
|
||||||
|
|
|
@ -42,7 +42,13 @@ in
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
services.matrix-synapse = {
|
services.matrix-synapse =
|
||||||
|
let
|
||||||
|
extraConfig = builtins.toFile "extraConfig.yaml" ''
|
||||||
|
registration_requires_token: true
|
||||||
|
'';
|
||||||
|
in
|
||||||
|
{
|
||||||
enable = true;
|
enable = true;
|
||||||
withJemalloc = true;
|
withJemalloc = true;
|
||||||
|
|
||||||
|
@ -51,11 +57,13 @@ in
|
||||||
"${vs.synapse}/registration_shared_secret"
|
"${vs.synapse}/registration_shared_secret"
|
||||||
"${vs.synapse}/form_secret"
|
"${vs.synapse}/form_secret"
|
||||||
"${vs.synapse}/turn_shared_secret"
|
"${vs.synapse}/turn_shared_secret"
|
||||||
|
extraConfig
|
||||||
];
|
];
|
||||||
|
|
||||||
settings =
|
settings =
|
||||||
{
|
{
|
||||||
server_name = "meowy.tech";
|
server_name = "meowy.tech";
|
||||||
|
enable_registration = true;
|
||||||
public_baseurl = "https://chat.meowy.tech";
|
public_baseurl = "https://chat.meowy.tech";
|
||||||
listeners = [
|
listeners = [
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue