2022-07-13 19:50:19 +02:00
|
|
|
{ pkgs, config, ... }: {
|
|
|
|
services.nginx = {
|
|
|
|
enable = true;
|
2022-12-30 18:29:13 +01:00
|
|
|
virtualHosts."click.${config.deployment-TLMS.domain}" = {
|
2022-07-13 19:50:19 +02:00
|
|
|
enableACME = true;
|
|
|
|
forceSSL = true;
|
|
|
|
locations."/" = {
|
2022-12-30 18:29:13 +01:00
|
|
|
root = if (config.deployment-TLMS.domain == "dvb.solutions") then "${pkgs.click}/web/" else "${pkgs.click-staging}/web/";
|
2022-07-13 19:50:19 +02:00
|
|
|
index = "index.html";
|
2022-09-20 17:17:16 +02:00
|
|
|
tryFiles = "$uri /index.html";
|
2022-07-13 19:50:19 +02:00
|
|
|
};
|
2022-09-20 16:54:12 +02:00
|
|
|
locations."/regions/" = {
|
|
|
|
alias = "/${pkgs.click}/web/";
|
2022-09-16 15:27:09 +02:00
|
|
|
};
|
2022-09-20 16:54:12 +02:00
|
|
|
locations."/stations/" = {
|
|
|
|
alias = "/${pkgs.click}/web/";
|
2022-09-16 15:27:09 +02:00
|
|
|
};
|
2022-09-22 17:12:56 +02:00
|
|
|
locations."/mystations/" = {
|
2022-09-20 16:54:12 +02:00
|
|
|
alias = "/${pkgs.click}/web/";
|
2022-09-16 15:27:09 +02:00
|
|
|
};
|
2022-07-13 19:50:19 +02:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|