From 8edc4619abc884d97583c1ec714c9f7c795fbbac Mon Sep 17 00:00:00 2001 From: Jörg Thalheim Date: Tue, 8 Sep 2020 07:59:50 +0200 Subject: nixos/telegraf: switch to setting types This allows to split up configuration into multiple modules --- nixos/tests/telegraf.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'nixos/tests') diff --git a/nixos/tests/telegraf.nix b/nixos/tests/telegraf.nix index 73f741b113574..483a5ae7e5405 100644 --- a/nixos/tests/telegraf.nix +++ b/nixos/tests/telegraf.nix @@ -6,12 +6,15 @@ import ./make-test-python.nix ({ pkgs, ...} : { machine = { ... }: { services.telegraf.enable = true; + services.telegraf.environmentFile = 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"; -- cgit 1.4.1