feat: Update cinny to use hashRouter and update caddy reverse proxy
All checks were successful
Flake checker / Build Nix targets (push) Successful in 9m22s

This commit is contained in:
2026-02-24 13:50:59 +05:30
parent ea7707d050
commit 81ea7f695e
3 changed files with 17 additions and 9 deletions

View File

@@ -12,6 +12,10 @@
defaultHomeserver = 0;
homeserverList = ["darksailor.dev" "matrix.org"];
allowCustomHomeservers = false;
hashRouter = {
enabled = true;
basename = "/";
};
};
cinnyConfigFile = pkgs.writeText "cinny-config.json" cinnyConfig;
in {
@@ -68,14 +72,18 @@ in {
};
services.caddy.virtualHosts = {
"matrix.${base_domain}".extraConfig = ''
reverse_proxy /_matrix/* localhost:${toString port}
handle /_matrix/* {
reverse_proxy /_matrix/* localhost:${toString port}
}
handle_path /config.json {
file_server
root ${cinnyConfigFile}
}
root * ${pkgs.cinny}
try_files {path} / index.html
file_server
handle {
root * ${pkgs.cinny}
try_files {path} /index.html
file_server
}
'';
"${base_domain}".extraConfig = ''
reverse_proxy /.well-known/* localhost:${toString port}

View File

@@ -23,7 +23,7 @@
caddy = 2019;
};
in {
sops.secrets."grafana.secretKey" = {
sops.secrets."grafana/secret_key" = {
owner = "grafana";
};
# Grafana configuration with Authelia integration
@@ -57,7 +57,7 @@ in {
security = {
disable_gravatar = true;
cookie_secure = true;
secret_key = ''$__file{${config.sops.secrets."grafana.secretKey".path}}'';
secret_key = ''$__file{${config.sops.secrets."grafana/secret_key".path}}'';
};
analytics = {