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

26 lines
722 B
Nix
Raw Normal View History

2023-07-11 22:41:18 +05:30
_: {
2023-06-02 12:45:51 +05:30
virtualisation.oci-containers.containers."adtya.xyz" = {
image = "ghcr.io/adtya/adtya.xyz:latest";
ports = ["3000:80"];
};
services.caddy.virtualHosts."adtya.xyz" = {
2023-06-02 12:52:48 +05:30
serverAliases = ["www.adtya.xyz"];
2023-06-02 12:45:51 +05:30
extraConfig = ''
reverse_proxy http://127.0.0.1:3000
2023-06-02 13:35:52 +05:30
handle /.well-known/matrix/server {
2023-06-03 00:43:12 +05:30
header Content-Type application/json
header Access-Control-Allow-Origin *
respond `{"m.server": "matrix.adtya.xyz:443"}`
}
2023-06-02 13:35:52 +05:30
2023-06-03 00:43:12 +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-06-02 12:45:51 +05:30
'';
};
}