summaryrefslogtreecommitdiff
path: root/hosts/kay/modules
diff options
context:
space:
mode:
authorsinanmohd <sinan@sinanmohd.com>2024-01-16 11:18:11 +0530
committersinanmohd <sinan@sinanmohd.com>2024-01-16 11:19:30 +0530
commit22d76c0e6225615195a575deb6701dc5d84df057 (patch)
treeb927ebcbf2190e9ce90a4882db91a7dd69d4af72 /hosts/kay/modules
parente0da2bba6904aa924dee63f10788997761f75d36 (diff)
kay/www: cleanup
Diffstat (limited to 'hosts/kay/modules')
-rw-r--r--hosts/kay/modules/www.nix43
1 files changed, 26 insertions, 17 deletions
diff --git a/hosts/kay/modules/www.nix b/hosts/kay/modules/www.nix
index 2e409e3..671587b 100644
--- a/hosts/kay/modules/www.nix
+++ b/hosts/kay/modules/www.nix
@@ -48,40 +48,48 @@ in
globalRedirect = "www.${domain}";
extraConfig = ''
- client_max_body_size ${toString config.services.dendrite.settings.media_api.max_file_size_bytes};
+ client_max_body_size ${toString
+ config.services.dendrite.settings.media_api.max_file_size_bytes
+ };
'';
- locations."/.well-known/matrix/server".return = ''
- 200 '{ "m.server": "${domain}:443" }'
- '';
- locations."/_matrix" = {
- proxyPass = "http://127.0.0.1:${toString config.services.dendrite.httpPort}";
- };
+ locations = {
+ "/.well-known/matrix/server".return = ''
+ 200 '{ "m.server": "${domain}:443" }'
+ '';
- locations."/.well-known/matrix/client".return = ''
- 200 '${builtins.toJSON {
- "m.homeserver".base_url = "https://${domain}";
- "org.matrix.msc3575.proxy".url = "https://${domain}";
- }}'
- '';
- locations."/_matrix/client/unstable/org.matrix.msc3575/sync" = let
- addr = "${config.services.matrix-sliding-sync.settings.SYNCV3_BINDADDR}";
- in {
- proxyPass = "http://${addr}";
+ "/.well-known/matrix/client".return = ''
+ 200 '${builtins.toJSON {
+ "m.homeserver".base_url = "https://${domain}";
+ "org.matrix.msc3575.proxy".url = "https://${domain}";
+ }}'
+ '';
+
+ "/_matrix".proxyPass = "http://127.0.0.1:${toString
+ config.services.dendrite.httpPort
+ }";
+
+ "/_matrix/client/unstable/org.matrix.msc3575/sync".proxyPass =
+ "http://${config.services.matrix-sliding-sync.settings.SYNCV3_BINDADDR}";
};
};
+
"www.${domain}" = defaultOpts // {
root = "/var/www/${domain}";
};
+
"git.${domain}" = defaultOpts;
+
"bin.${domain}" = defaultOpts // {
root = "${storage}/bin";
locations."= /".return = "307 https://www.${domain}";
};
+
"static.${domain}" = defaultOpts // {
root = "${storage}/static";
locations."= /".return = "301 https://www.${domain}";
};
+
"${fscusat}" = defaultOpts // {
globalRedirect = "www.${fscusat}";
};
@@ -91,6 +99,7 @@ in
extraConfig = "add_header Content-Type text/html;";
};
};
+
"${mark}" = defaultOpts // {
globalRedirect = "www.${mark}";
};