diff options
author | Jörg Thalheim <Mic92@users.noreply.github.com> | 2021-07-18 12:08:39 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-18 12:08:39 +0100 |
commit | aa5d9ad832e9ecd080672c2ea462e7793b5f37f8 (patch) | |
tree | 1de22947c8346480afe8b3b83ef2b03004e5f6fa | |
parent | e99777e9280856155569f9d9c31f02d21555b5de (diff) | |
parent | c24fa221abfe606ccfde6d0aa73662385c9d3a77 (diff) | |
download | nixpkgs-aa5d9ad832e9ecd080672c2ea462e7793b5f37f8.tar nixpkgs-aa5d9ad832e9ecd080672c2ea462e7793b5f37f8.tar.gz nixpkgs-aa5d9ad832e9ecd080672c2ea462e7793b5f37f8.tar.bz2 nixpkgs-aa5d9ad832e9ecd080672c2ea462e7793b5f37f8.tar.lz nixpkgs-aa5d9ad832e9ecd080672c2ea462e7793b5f37f8.tar.xz nixpkgs-aa5d9ad832e9ecd080672c2ea462e7793b5f37f8.tar.zst nixpkgs-aa5d9ad832e9ecd080672c2ea462e7793b5f37f8.zip |
Merge pull request #130520 from Mic92/telegraf
nixos/telegraf: don't run as nogroup
-rw-r--r-- | nixos/modules/services/monitoring/telegraf.nix | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/nixos/modules/services/monitoring/telegraf.nix b/nixos/modules/services/monitoring/telegraf.nix index bc30ca3b77c..4046260c164 100644 --- a/nixos/modules/services/monitoring/telegraf.nix +++ b/nixos/modules/services/monitoring/telegraf.nix @@ -25,10 +25,9 @@ in { default = []; example = "/run/keys/telegraf.env"; description = '' - File to load as environment file. Environment variables - from this file will be interpolated into the config file - using envsubst with this syntax: - <literal>$ENVIRONMENT ''${VARIABLE}</literal> + File to load as environment file. Environment variables from this file + will be interpolated into the config file using envsubst with this + syntax: <literal>$ENVIRONMENT</literal> or <literal>''${VARIABLE}</literal>. This is useful to avoid putting secrets into the nix store. ''; }; @@ -73,6 +72,7 @@ in { ExecReload="${pkgs.coreutils}/bin/kill -HUP $MAINPID"; RuntimeDirectory = "telegraf"; User = "telegraf"; + Group = "telegraf"; Restart = "on-failure"; # for ping probes AmbientCapabilities = [ "CAP_NET_RAW" ]; @@ -81,7 +81,10 @@ in { users.users.telegraf = { uid = config.ids.uids.telegraf; + group = "telegraf"; description = "telegraf daemon user"; }; + + users.groups.telegraf = {}; }; } |