nix-infra/hosts/monitoring/nginx.nix
2026-09-10 23:39:22 +02:00

24 lines
546 B
Nix

{ config, ... }:
{
networking.firewall.allowedTCPPorts = [ 3101 ];
services.nginx = {
enable = true;
recommendedProxySettings = true;
recommendedGzipSettings = true;
virtualHosts."loki.internal" = {
listen = [
{
addr = "0.0.0.0";
port = 3101;
ssl = false;
} # Set ssl = true if certificates are supplied
];
locations."/" = {
proxyPass = "http://localhost:${toString config.services.loki.configuration.server.http_listen_port}";
};
};
};
}