Add traefik route for grafana dashboard

This commit is contained in:
Evie Litherland-Smith 2023-10-21 17:59:26 +01:00
parent a1c28e779a
commit b575f6af22
2 changed files with 18 additions and 0 deletions

View file

@ -1,6 +1,7 @@
{ config, lib, pkgs, ... }:
{
imports = [ ../traefik/grafana.nix ];
services.grafana = {
enable = true;
settings = {

View file

@ -0,0 +1,17 @@
{ config, lib, pkgs, ... }:
{
imports = [ ./default.nix ];
services.traefik.dynamicConfigOptions = {
http = {
routers.grafana = {
rule = "Host(`grafana.xenia.me.uk`)";
entryPoints = [ "http" "https" ];
service = "grafana-webinterface";
tls = { certResolver = "default"; };
};
services.grafana-webinterface.loadBalancer.servers =
[{ url = "http://localhost:3100"; }];
};
};
}