refactor(matrix): update matrix config to Cinny
All checks were successful
Flake checker / Build Nix targets (push) Successful in 9m32s
All checks were successful
Flake checker / Build Nix targets (push) Successful in 9m32s
This commit is contained in:
@@ -8,19 +8,12 @@
|
|||||||
client_id = "tuwunel";
|
client_id = "tuwunel";
|
||||||
rtc_domain = "matrix-rtc.${base_domain}";
|
rtc_domain = "matrix-rtc.${base_domain}";
|
||||||
jwt_port = 8081;
|
jwt_port = 8081;
|
||||||
elementConfig = builtins.toJSON {
|
cinnyConfig = builtins.toJSON {
|
||||||
default_server_config = {
|
defaultHomeserver = 0;
|
||||||
"m.homeserver" = {
|
homeserverList = ["darksailor.dev" "matrix.org"];
|
||||||
base_url = "https://matrix.${base_domain}";
|
allowCustomHomeservers = false;
|
||||||
};
|
|
||||||
};
|
|
||||||
sso_redirect_options = {
|
|
||||||
immediate = false;
|
|
||||||
on_welcome_page = true;
|
|
||||||
on_login_page = true;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
elementConfigFile = pkgs.writeText "element-config.json" elementConfig;
|
cinnyConfigFile = pkgs.writeText "cinny-config.json" cinnyConfig;
|
||||||
in {
|
in {
|
||||||
sops = {
|
sops = {
|
||||||
secrets."tuwunel/client_id" = {
|
secrets."tuwunel/client_id" = {
|
||||||
@@ -78,9 +71,10 @@ in {
|
|||||||
reverse_proxy /_matrix/* localhost:${toString port}
|
reverse_proxy /_matrix/* localhost:${toString port}
|
||||||
handle_path /config.json {
|
handle_path /config.json {
|
||||||
file_server
|
file_server
|
||||||
root ${elementConfigFile}
|
root ${cinnyConfigFile}
|
||||||
}
|
}
|
||||||
root * ${pkgs.element-web}
|
root * ${pkgs.cinny}
|
||||||
|
try_files {path} / index.html
|
||||||
file_server
|
file_server
|
||||||
'';
|
'';
|
||||||
"${base_domain}".extraConfig = ''
|
"${base_domain}".extraConfig = ''
|
||||||
|
|||||||
Reference in New Issue
Block a user