what
This commit is contained in:
parent
616f310f4a
commit
1555d7b643
51 changed files with 243 additions and 231 deletions
|
@ -1,13 +1,11 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
{config, ...}: let
|
||||
virtualHostName = "grafana.helveticanonstandard.net";
|
||||
in {
|
||||
services.grafana = {
|
||||
enable = true;
|
||||
|
||||
settings.server = {
|
||||
domain = "grafana.pele";
|
||||
domain = virtualHostName;
|
||||
http_port = 9010;
|
||||
http_addr = "127.0.0.1";
|
||||
root_url = "http://192.168.1.10:8010"; # TODO
|
||||
|
@ -23,24 +21,24 @@
|
|||
name = "Prometheus";
|
||||
type = "prometheus";
|
||||
access = "proxy";
|
||||
url = "http://127.0.0.1:${toString config.services.prometheus.port}";
|
||||
url = "http://127.0.0.1:${builtins.toString config.services.prometheus.port}";
|
||||
}
|
||||
{
|
||||
name = "Loki";
|
||||
type = "loki";
|
||||
access = "proxy";
|
||||
url = "http://127.0.0.1:${toString config.services.loki.configuration.server.http_listen_port}";
|
||||
url = "http://127.0.0.1:${builtins.toString config.services.loki.configuration.server.http_listen_port}";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
services.nginx.virtualHosts.${config.services.grafana.settings.server.domain} = {
|
||||
services.nginx.virtualHosts.${virtualHostName} = {
|
||||
locations."/" = {
|
||||
proxyPass = "http://${lib.formatHostPort {
|
||||
proxyPass = let
|
||||
host = config.services.grafana.settings.server.http_addr;
|
||||
port = config.services.grafana.settings.server.http_port;
|
||||
}}";
|
||||
port = builtins.toString config.services.grafana.settings.server.http_port;
|
||||
in "http://${host}:${port}";
|
||||
proxyWebsockets = true;
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue