{ config, ... }: { services.nginx = { enable = true; virtualHosts = { "grafana2.grzb.de" = { forceSSL = true; enableACME = true; listen = [ { addr = "0.0.0.0"; port = 80; } { addr = "0.0.0.0"; port = 443; ssl = true; } ]; locations."/" = { proxyPass = "http://${config.services.grafana.settings.server.http_addr}:${builtins.toString config.services.grafana.settings.server.http_port}"; }; }; }; }; }