{config, ...}: let cfg = config.services.grafana; in { services.grafana = { enable = true; }; services.nginx.virtualHosts = { ${cfg.settings.server.domain} = { forceSSL = true; enableACME = true; locations."/" = { proxyPass = "http://localhost:${toString cfg.settings.server.http_port}"; }; }; }; }