diff options
Diffstat (limited to 'nixos/tests/telegraf.nix')
-rw-r--r-- | nixos/tests/telegraf.nix | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/nixos/tests/telegraf.nix b/nixos/tests/telegraf.nix index 73f741b1135..d99680ce2c3 100644 --- a/nixos/tests/telegraf.nix +++ b/nixos/tests/telegraf.nix @@ -1,17 +1,20 @@ import ./make-test-python.nix ({ pkgs, ...} : { name = "telegraf"; - meta = with pkgs.stdenv.lib.maintainers; { + meta = with pkgs.lib.maintainers; { maintainers = [ mic92 ]; }; machine = { ... }: { services.telegraf.enable = true; + services.telegraf.environmentFiles = [(pkgs.writeText "secrets" '' + SECRET=example + '')]; services.telegraf.extraConfig = { agent.interval = "1s"; agent.flush_interval = "1s"; inputs.exec = { commands = [ - "${pkgs.runtimeShell} -c 'echo example,tag=a i=42i'" + "${pkgs.runtimeShell} -c 'echo $SECRET,tag=a i=42i'" ]; timeout = "5s"; data_format = "influx"; |