nix-config/modules/data-hoarder/map.nix

30 lines
743 B
Nix
Raw Normal View History

{ pkgs, config, ... }: {
2022-05-02 12:38:16 +02:00
services = {
nginx = {
enable = true;
recommendedProxySettings = true;
virtualHosts = {
"map.${config.deployment-dvb.domain}" = {
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
};
};
};
};
};
}