2024-02-02 10:51:31 +01:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
pkgs,
|
|
|
|
sources,
|
|
|
|
...
|
|
|
|
}:
|
2023-09-25 00:40:47 +02:00
|
|
|
|
|
|
|
let
|
2023-10-20 20:10:55 +02:00
|
|
|
metis = import sources.metis { inherit pkgs; };
|
2023-10-02 21:32:54 +02:00
|
|
|
|
2023-12-19 18:38:57 +01:00
|
|
|
inherit (metis) providers;
|
2024-02-02 10:51:31 +01:00
|
|
|
in
|
|
|
|
{
|
2023-10-02 21:32:54 +02:00
|
|
|
services.nginx.virtualHosts."calendrier.dgnum.eu" = {
|
2023-09-25 00:40:47 +02:00
|
|
|
enableACME = true;
|
|
|
|
forceSSL = true;
|
2023-12-19 18:38:57 +01:00
|
|
|
root = metis.production;
|
2023-09-25 00:40:47 +02:00
|
|
|
|
2024-03-10 01:03:30 +01:00
|
|
|
locations = lib.mapAttrs' (
|
|
|
|
name: value:
|
|
|
|
lib.nameValuePair "/cal/${name}/" {
|
|
|
|
extraConfig = ''
|
|
|
|
proxy_set_header X-Forwarded-Host $host;
|
|
|
|
proxy_set_header X-Forwarded-Server $host;
|
|
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
|
|
proxy_pass ${value};
|
|
|
|
'';
|
|
|
|
}
|
|
|
|
) providers;
|
2023-10-01 22:50:15 +02:00
|
|
|
|
|
|
|
extraConfig = ''
|
|
|
|
rewrite ^/calendrier(.*)$ $1 permanent;
|
|
|
|
'';
|
2023-09-25 00:40:47 +02:00
|
|
|
};
|
|
|
|
}
|