From c081a03a97780afd845e017f279e0f1e96a86c8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isma=C3=ABl=20Bouya?= Date: Sun, 28 Mar 2021 18:39:14 +0200 Subject: Fix netdata stream for eldiron --- modules/private/system/eldiron.nix | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) (limited to 'modules/private/system') diff --git a/modules/private/system/eldiron.nix b/modules/private/system/eldiron.nix index 2475710..fdc3692 100644 --- a/modules/private/system/eldiron.nix +++ b/modules/private/system/eldiron.nix @@ -122,13 +122,21 @@ services.netdata.config.global."memory mode" = "none"; services.netdata.config.health."enabled" = "no"; services.netdata.config.web.mode = "none"; - environment.etc."netdata/stream.conf".text = '' - [stream] - enabled = yes - destination = ${config.myEnv.monitoring.netdata_aggregator} - api key = ${config.myEnv.monitoring.netdata_keys.eldiron} - ''; + users.users."${config.services.netdata.user}".extraGroups = [ "keys" ]; + environment.etc."netdata/stream.conf".source = "/var/secrets/netdata-stream.conf"; secrets.keys = [ + { + dest = "netdata-stream.conf"; + user = config.services.netdata.user; + group = config.services.netdata.group; + permissions = "0400"; + text = '' + [stream] + enabled = yes + destination = ${config.myEnv.monitoring.netdata_aggregator} + api key = ${config.myEnv.monitoring.netdata_keys.eldiron} + ''; + } { dest = "zrepl_backup/identity"; user = "root"; -- cgit v1.2.3