Flake parts with x64 and ARM support for devshell on both Linux and Mac
This commit is contained in:
76
nix/monitoring/nginx.nix
Normal file
76
nix/monitoring/nginx.nix
Normal file
@ -0,0 +1,76 @@
|
||||
{ config, ... }:
|
||||
let
|
||||
hostIP = "192.168.0.130";
|
||||
in
|
||||
{
|
||||
services.nginx = {
|
||||
|
||||
upstreams = {
|
||||
"grafana" = {
|
||||
servers = {
|
||||
"127.0.0.1:${toString config.services.grafana.settings.server.http_port}" = { };
|
||||
};
|
||||
};
|
||||
"prometheus" = {
|
||||
servers = {
|
||||
"127.0.0.1:${toString config.services.prometheus.port}" = { };
|
||||
};
|
||||
};
|
||||
"loki" = {
|
||||
servers = {
|
||||
"127.0.0.1:${toString config.services.loki.configuration.server.http_listen_port}" = { };
|
||||
};
|
||||
};
|
||||
"promtail" = {
|
||||
servers = {
|
||||
"127.0.0.1:${toString config.services.promtail.configuration.server.http_listen_port}" = { };
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
virtualHosts."graf.matri.cx" = {
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
root = "/var/www/graf.matri.cx";
|
||||
locations."/" = {
|
||||
proxyPass = "http://grafana";
|
||||
proxyWebsockets = true;
|
||||
};
|
||||
};
|
||||
|
||||
virtualHosts.grafana = {
|
||||
locations."/" = {
|
||||
proxyPass = "http://grafana";
|
||||
proxyWebsockets = true;
|
||||
};
|
||||
listen = [{
|
||||
addr = hostIP;
|
||||
port = 8010;
|
||||
}];
|
||||
};
|
||||
|
||||
virtualHosts.prometheus = {
|
||||
locations."/".proxyPass = "http://prometheus";
|
||||
listen = [{
|
||||
addr = hostIP;
|
||||
port = 8020;
|
||||
}];
|
||||
};
|
||||
|
||||
virtualHosts.loki = {
|
||||
locations."/".proxyPass = "http://loki";
|
||||
listen = [{
|
||||
addr = hostIP;
|
||||
port = 8030;
|
||||
}];
|
||||
};
|
||||
|
||||
virtualHosts.promtail = {
|
||||
locations."/".proxyPass = "http://promtail";
|
||||
listen = [{
|
||||
addr = hostIP;
|
||||
port = 8031;
|
||||
}];
|
||||
};
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user