mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-22 12:53:54 +00:00
dd-agent: Run as a separate user
This commit is contained in:
parent
85188d19c5
commit
f3d4d24d6b
@ -43,6 +43,14 @@ in {
|
||||
config = mkIf cfg.enable {
|
||||
environment.etc = [ { source = datadog-conf; target = "dd-agent/datadog.conf"; } ];
|
||||
|
||||
users.extraUsers."dd-agent" = {
|
||||
description = "Datadog Agent User";
|
||||
|
||||
group = "dd-agent";
|
||||
};
|
||||
|
||||
users.extraGroups."dd-agent" = { };
|
||||
|
||||
systemd.services.dd-agent = {
|
||||
description = "Datadog agent monitor";
|
||||
|
||||
@ -50,7 +58,13 @@ in {
|
||||
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
|
||||
serviceConfig.ExecStart = "${pkgs.dd-agent}/bin/dd-agent foreground";
|
||||
serviceConfig = {
|
||||
ExecStart = "${pkgs.dd-agent}/bin/dd-agent foreground";
|
||||
|
||||
User = "dd-agent";
|
||||
|
||||
Group = "dd-agent";
|
||||
};
|
||||
|
||||
restartTriggers = [ pkgs.dd-agent ];
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user