Grafana: Difference between revisions
simply explanation of setting up subpath / subdomain |
|||
Line 7: | Line 7: | ||
Grafana is available as NixOS module, it can be enabled using the following config: | Grafana is available as NixOS module, it can be enabled using the following config: | ||
<syntaxhighlight lang=nix> | <syntaxhighlight lang="nix"> | ||
services.grafana = { | services.grafana = { | ||
enable = true; | enable = true; | ||
settings = { | settings = { | ||
server = { | server = { | ||
http_addr = "127.0.0.1"; | http_addr = "127.0.0.1"; | ||
http_port = 3000; | http_port = 3000; | ||
# Grafana | domain = "grafana.your.domain"; | ||
domain = "your.domain"; | |||
root_url = "https://your.domain/grafana/"; | # Alternatively, if you want to server Grafana from a subpath: | ||
serve_from_sub_path = true; | # domain = "your.domain"; | ||
# root_url = "https://your.domain/grafana/"; | |||
# serve_from_sub_path = true; | |||
}; | }; | ||
}; | }; |