2023-08-06 17:53:50 +02:00
|
|
|
{ config, ... }:
|
|
|
|
{
|
|
|
|
services.nginx = {
|
|
|
|
enable = true;
|
|
|
|
virtualHosts = {
|
2023-08-07 00:58:45 +02:00
|
|
|
${config.services.grafana.settings.server.domain} = {
|
2023-08-06 17:53:50 +02:00
|
|
|
forceSSL = true;
|
|
|
|
enableACME = true;
|
|
|
|
listen = [
|
|
|
|
{
|
|
|
|
addr = "0.0.0.0";
|
|
|
|
port = 80;
|
|
|
|
}
|
|
|
|
{
|
|
|
|
addr = "0.0.0.0";
|
|
|
|
port = 443;
|
|
|
|
ssl = true;
|
|
|
|
}
|
|
|
|
];
|
|
|
|
locations."/" = {
|
|
|
|
proxyPass = "http://${config.services.grafana.settings.server.http_addr}:${builtins.toString config.services.grafana.settings.server.http_port}";
|
2023-08-07 00:58:45 +02:00
|
|
|
proxyWebsockets = true;
|
2023-08-06 17:53:50 +02:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|