From 5532262053dc792e078b4cbe2b5275198f85dafa Mon Sep 17 00:00:00 2001 From: Magic_RB Date: Tue, 7 Mar 2023 23:36:15 +0100 Subject: [PATCH] Fix telegraf module Signed-off-by: Magic_RB --- nixos/modules/public/telegraf.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nixos/modules/public/telegraf.nix b/nixos/modules/public/telegraf.nix index b4f8a01..dd80b62 100644 --- a/nixos/modules/public/telegraf.nix +++ b/nixos/modules/public/telegraf.nix @@ -4,7 +4,7 @@ let cfg = config.services.telegraf-magic; settingsFormat = pkgs.formats.toml {}; - configFile = settingsFormat.generate "config.toml" cfg.extraConfig; + configFile = settingsFormat.generate "config.toml" cfg.settings; in { options = { services.telegraf-magic = { @@ -36,13 +36,14 @@ in { systemd = mkOption { default = {}; description = lib.mdDoc "Applied to `systemd.services.telegraf`."; - type = type.unspecified; + type = types.unspecified; }; }; }; config = mkIf cfg.enable { systemd.services.telegraf = mkMerge [ + (cfg.systemd) { description = "Telegraf Agent"; wantedBy = [ "multi-user.target" ]; @@ -58,7 +59,6 @@ in { AmbientCapabilities = [ "CAP_NET_RAW" ]; }; } - (config.services.telegraf.systemd) ]; users.users.telegraf = {