mirror of
https://git.sr.ht/~magic_rb/dotfiles
synced 2024-11-26 01:56:13 +01:00
Fix telegraf module
Signed-off-by: Magic_RB <magic_rb@redalder.org>
This commit is contained in:
parent
dd2a8accba
commit
5532262053
|
@ -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 = {
|
||||
|
|
Loading…
Reference in a new issue