Merge pull request #130520 from Mic92/telegraf
nixos/telegraf: don't run as nogroup
This commit is contained in:
commit
aa5d9ad832
1 changed files with 7 additions and 4 deletions
|
@ -25,10 +25,9 @@ in {
|
||||||
default = [];
|
default = [];
|
||||||
example = "/run/keys/telegraf.env";
|
example = "/run/keys/telegraf.env";
|
||||||
description = ''
|
description = ''
|
||||||
File to load as environment file. Environment variables
|
File to load as environment file. Environment variables from this file
|
||||||
from this file will be interpolated into the config file
|
will be interpolated into the config file using envsubst with this
|
||||||
using envsubst with this syntax:
|
syntax: <literal>$ENVIRONMENT</literal> or <literal>''${VARIABLE}</literal>.
|
||||||
<literal>$ENVIRONMENT ''${VARIABLE}</literal>
|
|
||||||
This is useful to avoid putting secrets into the nix store.
|
This is useful to avoid putting secrets into the nix store.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
@ -73,6 +72,7 @@ in {
|
||||||
ExecReload="${pkgs.coreutils}/bin/kill -HUP $MAINPID";
|
ExecReload="${pkgs.coreutils}/bin/kill -HUP $MAINPID";
|
||||||
RuntimeDirectory = "telegraf";
|
RuntimeDirectory = "telegraf";
|
||||||
User = "telegraf";
|
User = "telegraf";
|
||||||
|
Group = "telegraf";
|
||||||
Restart = "on-failure";
|
Restart = "on-failure";
|
||||||
# for ping probes
|
# for ping probes
|
||||||
AmbientCapabilities = [ "CAP_NET_RAW" ];
|
AmbientCapabilities = [ "CAP_NET_RAW" ];
|
||||||
|
@ -81,7 +81,10 @@ in {
|
||||||
|
|
||||||
users.users.telegraf = {
|
users.users.telegraf = {
|
||||||
uid = config.ids.uids.telegraf;
|
uid = config.ids.uids.telegraf;
|
||||||
|
group = "telegraf";
|
||||||
description = "telegraf daemon user";
|
description = "telegraf daemon user";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
users.groups.telegraf = {};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue