Skip to content
Snippets Groups Projects
Commit 70806819 authored by Florian Sesser's avatar Florian Sesser
Browse files

Only include the environment file if Slack alerter is enabled

parent 5ddf941a
No related branches found
No related tags found
2 merge requests!228merge develop into production,!185Enable alerting
Pipeline #1175 passed
......@@ -81,7 +81,11 @@ in {
# Port 80 for ACME ssl retrieval only. 443 for nginx -> grafana.
networking.firewall.allowedTCPPorts = [ 80 443 ];
systemd.services.grafana.serviceConfig.EnvironmentFile = cfg.grafanaEnvironmentFile;
# We pass the secret Slack URL using an environment variable.
systemd.services.grafana.serviceConfig.EnvironmentFile =
if cfg.enableSlackAlert
then [ cfg.grafanaEnvironmentFile ]
else [ ];
services.grafana = {
enable = true;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment