29 lines
681 B
Nix
29 lines
681 B
Nix
{ config, pkgs, ... }:
|
|
|
|
let
|
|
domain = "mc.compsigh.club";
|
|
gitRepo = "https://git.extremist.software/jet/compsigh-minecraft";
|
|
in
|
|
{
|
|
services.caddy = {
|
|
enable = true;
|
|
|
|
virtualHosts = {
|
|
# minecraft.compsigh.club → redirect to git repo
|
|
"${domain}" = {
|
|
extraConfig = ''
|
|
redir /terms ${gitRepo}/src/branch/main/terms.txt permanent
|
|
redir /privacy ${gitRepo}/src/branch/main/privacy.txt permanent
|
|
redir ${gitRepo} permanent
|
|
'';
|
|
};
|
|
|
|
# status.minecraft.compsigh.club → Grafana
|
|
"status.${domain}" = {
|
|
extraConfig = ''
|
|
reverse_proxy localhost:3000
|
|
'';
|
|
};
|
|
};
|
|
};
|
|
}
|