configuration.nix/hosts/rico2/services/adtya.xyz.nix

65 lines
1.5 KiB
Nix
Raw Normal View History

2023-11-04 16:12:45 +05:30
{ pkgs
2023-11-06 01:31:56 +05:30
, adtyaxyz
2023-11-04 16:12:45 +05:30
, ...
}:
let
2024-01-04 21:51:16 +05:30
inherit (pkgs) system;
2023-11-04 16:12:45 +05:30
in
{
2023-10-28 05:12:43 +05:30
services = {
caddy.virtualHosts."adtya.xyz" = {
2023-11-04 16:12:45 +05:30
serverAliases = [ "www.adtya.xyz" ];
2023-10-28 05:12:43 +05:30
extraConfig = ''
handle /.well-known/matrix/server {
header Content-Type application/json
header Access-Control-Allow-Origin *
2024-01-04 21:51:25 +05:30
respond `{"m.server": "https://matrix.adtya.xyz:443"}`
2023-10-28 05:12:43 +05:30
}
2023-06-02 13:35:52 +05:30
2023-10-28 05:12:43 +05:30
handle /.well-known/matrix/client {
header Content-Type application/json
header Access-Control-Allow-Origin *
respond `{"m.homeserver": {"base_url": "https://matrix.adtya.xyz:443"}}`
}
2023-10-28 04:31:09 +05:30
2023-11-03 18:16:22 +05:30
handle /.well-known/discord {
header Access-Control-Allow-Origin *
2023-11-12 15:04:59 +05:30
respond `dh=bd67bb4659b662a5ee2b1b043e7b3171b2cb44bd`
2023-11-03 18:16:22 +05:30
}
2023-10-28 05:12:43 +05:30
handle {
2023-11-06 01:31:56 +05:30
root * ${adtyaxyz.packages.${system}.default}/share/web
2023-10-28 05:12:43 +05:30
encode gzip
try_files {path} /index.html
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;
};
};
2023-06-02 12:45:51 +05:30
};
}