refactor: adtya.xyz

This commit is contained in:
Adithya 2023-10-28 05:12:43 +05:30
parent 03c6aff8fb
commit 922e47c83c
Signed by: adtya
GPG key ID: 48FC9915FFD326D0
2 changed files with 47 additions and 44 deletions

View file

@ -3,27 +3,54 @@
adtya-xyz, adtya-xyz,
... ...
}: { }: {
services.caddy.virtualHosts."adtya.xyz" = { services = {
serverAliases = ["www.adtya.xyz"]; caddy.virtualHosts."adtya.xyz" = {
extraConfig = '' serverAliases = ["www.adtya.xyz"];
handle /.well-known/matrix/server { extraConfig = ''
header Content-Type application/json handle /.well-known/matrix/server {
header Access-Control-Allow-Origin * header Content-Type application/json
respond `{"m.server": "matrix.adtya.xyz:443"}` header Access-Control-Allow-Origin *
} respond `{"m.server": "matrix.adtya.xyz:443"}`
}
handle /.well-known/matrix/client { handle /.well-known/matrix/client {
header Content-Type application/json header Content-Type application/json
header Access-Control-Allow-Origin * header Access-Control-Allow-Origin *
respond `{"m.homeserver": {"base_url": "https://matrix.adtya.xyz:443"}}` respond `{"m.homeserver": {"base_url": "https://matrix.adtya.xyz:443"}}`
} }
handle { handle {
root * ${adtya-xyz.packages.${config.nixpkgs.system}.default}/share/web root * ${adtya-xyz.packages.${config.nixpkgs.system}.default}/share/web
encode gzip encode gzip
try_files {path} /index.html try_files {path} /index.html
file_server file_server
} }
''; '';
};
frp.settings = {
"http.adtya.xyz" = {
type = "http";
custom_domains = "adtya.xyz";
local_port = 80;
};
"https.adtya.xyz" = {
type = "https";
custom_domains = "adtya.xyz";
local_port = 443;
};
"http.www.adtya.xyz" = {
type = "http";
custom_domains = "www.adtya.xyz";
local_port = 80;
};
"https.www.adtya.xyz" = {
type = "https";
custom_domains = "www.adtya.xyz";
local_port = 443;
};
};
}; };
} }

View file

@ -22,30 +22,6 @@ in {
remote_port = 6002; remote_port = 6002;
}; };
"http.adtya.xyz" = {
type = "http";
custom_domains = "adtya.xyz";
local_port = 80;
};
"https.adtya.xyz" = {
type = "https";
custom_domains = "adtya.xyz";
local_port = 443;
};
"http.www.adtya.xyz" = {
type = "http";
custom_domains = "www.adtya.xyz";
local_port = 80;
};
"https.www.adtya.xyz" = {
type = "https";
custom_domains = "www.adtya.xyz";
local_port = 443;
};
"http.if3.adtya.xyz" = { "http.if3.adtya.xyz" = {
type = "http"; type = "http";
custom_domains = "if3.adtya.xyz"; custom_domains = "if3.adtya.xyz";