24 lines
546 B
Nix
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}";
|
|
};
|
|
};
|
|
};
|
|
}
|