From 054691fe548e90fccc474b61635b5a84d14fcec7 Mon Sep 17 00:00:00 2001 From: Leon Vack Date: Mon, 8 Apr 2024 11:00:14 +0200 Subject: [PATCH] nixos/alertmanager: add additional docs about envsubst Environment variables in the alertmanager config are substituted using envsubst. It is therefore necessary to escape $ as $$ in the config, if it should be preserved. (cherry picked from commit 11f45c83621f8169f1c0dba8462196903697b0f1) --- .../modules/services/monitoring/prometheus/alertmanager.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/nixos/modules/services/monitoring/prometheus/alertmanager.nix b/nixos/modules/services/monitoring/prometheus/alertmanager.nix index f40ac3c9138f..7e53ca04cb39 100644 --- a/nixos/modules/services/monitoring/prometheus/alertmanager.nix +++ b/nixos/modules/services/monitoring/prometheus/alertmanager.nix @@ -51,6 +51,9 @@ in { default = null; description = '' Alertmanager configuration as nix attribute set. + + The contents of the resulting config file are processed using envsubst. + `$` needs to be escaped as `$$` to be preserved. ''; }; @@ -62,6 +65,9 @@ in { defines the text that is written to alertmanager.yml. If null, the contents of alertmanager.yml is generated from the structured config options. + + The contents of the resulting config file are processed using envsubst. + `$` needs to be escaped as `$$` to be preserved. ''; };