2022-06-27 20:59:16 +02:00
|
|
|
{ pkgs, config, ... }: {
|
2022-05-02 12:38:16 +02:00
|
|
|
services = {
|
|
|
|
nginx = {
|
|
|
|
enable = true;
|
|
|
|
recommendedProxySettings = true;
|
|
|
|
virtualHosts = {
|
2022-09-28 22:19:40 +02:00
|
|
|
"map.${config.deployment-dvb.domain}" = {
|
2022-05-13 19:42:30 +02:00
|
|
|
forceSSL = true;
|
2022-05-02 12:38:16 +02:00
|
|
|
enableACME = true;
|
2022-07-28 22:36:56 +02:00
|
|
|
extraConfig = ''
|
|
|
|
autoindex on;
|
|
|
|
'';
|
|
|
|
|
2022-05-02 12:38:16 +02:00
|
|
|
locations = {
|
|
|
|
"/" = {
|
2022-10-16 14:25:28 +02:00
|
|
|
root = if (config.deployment-dvb.domain == "dvb.solutions") then "${pkgs.windshield}/tarballs/" else "${pkgs.windshield-staging}/bin/";
|
2022-05-02 17:37:41 +02:00
|
|
|
index = "index.html";
|
2022-10-16 15:59:17 +02:00
|
|
|
|
|
|
|
tryFiles = "$uri /index.html =404";
|
2022-05-02 12:38:16 +02:00
|
|
|
};
|
2022-10-16 14:25:28 +02:00
|
|
|
"~ /stop/*.(json)" = {
|
2022-09-07 22:51:18 +02:00
|
|
|
root = "${pkgs.stops}/";
|
2022-07-28 22:50:35 +02:00
|
|
|
};
|
2022-05-02 12:38:16 +02:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|