infrastructure/hosts/cesium/services/nginx/n7/projet-probleme-inverse-3D.nix
Laureηt a913961060
🎨 (cesium) dry-ify a little bit the nginx n7 sites
Could be even more dry if got rid of the fetchgit precompiled pages
2024-10-06 18:55:25 +02:00

34 lines
849 B
Nix

{
pkgs,
location,
vhost,
...
}: let
pages = pkgs.fetchgit {
url = "https://git.fainsin.bzh/ENSEEIHT/projet-probleme-inverse-3D";
rev = "9c75aadaf1b779e4f88fd42de163dedd8d5e918a"; # pages
sha256 = "19s8ccvarlps70aqc8njn92sbmmjbpc1d7q08hdb5apghmkplj9f";
};
in {
services.nginx.virtualHosts.${vhost}.locations."/${location}/" = {
alias = "${pages}/";
index = "index.html";
tryFiles = "$uri $uri/ /projet-probleme-inverse-3D/index.html";
};
services.gatus.settings.endpoints = [
{
name = location;
group = vhost;
url = "https://${vhost}/${location}/";
interval = "15m";
conditions = [
"[STATUS] == 200"
"[RESPONSE_TIME] < 300"
"[BODY] == pat(*slidevjs/slidev*)"
"[BODY] == pat(*/projet-probleme-inverse-3D/assets/index*)"
];
}
];
}