2024-10-06 16:55:25 +00:00
|
|
|
{
|
|
|
|
pkgs,
|
|
|
|
location,
|
|
|
|
vhost,
|
|
|
|
...
|
|
|
|
}: let
|
2023-06-25 18:34:55 +00:00
|
|
|
pages = pkgs.fetchgit {
|
|
|
|
url = "https://git.fainsin.bzh/ENSEEIHT/projet-long";
|
|
|
|
rev = "8290710fa7461c486dc727966c8eaa2234ae2e7d"; # pages
|
2023-07-04 17:08:32 +00:00
|
|
|
sha256 = "1xwc0hfdn77183vvm6gadibdd0bh379192qkzf2xvidfhb8yzgqr";
|
2023-06-25 18:34:55 +00:00
|
|
|
};
|
|
|
|
in {
|
2024-10-06 16:55:25 +00:00
|
|
|
services.nginx.virtualHosts.${vhost}.locations."/${location}/" = {
|
2024-10-06 16:15:10 +00:00
|
|
|
alias = "${pages}/";
|
|
|
|
index = "index.html";
|
|
|
|
tryFiles = "$uri $uri/ /projet-long/index.html";
|
|
|
|
};
|
|
|
|
|
|
|
|
services.gatus.settings.endpoints = [
|
|
|
|
{
|
2024-10-06 16:55:25 +00:00
|
|
|
name = location;
|
|
|
|
group = vhost;
|
|
|
|
url = "https://${vhost}/${location}/";
|
2024-10-06 16:15:10 +00:00
|
|
|
interval = "15m";
|
|
|
|
conditions = [
|
|
|
|
"[STATUS] == 200"
|
|
|
|
"[RESPONSE_TIME] < 300"
|
|
|
|
"[BODY] == pat(*slidevjs/slidev*)"
|
|
|
|
"[BODY] == pat(*/projet-long/assets/index*)"
|
|
|
|
];
|
|
|
|
}
|
|
|
|
];
|
2023-06-25 18:34:55 +00:00
|
|
|
}
|