nixos/do-agent: use .service from upstream
This commit is contained in:
parent
961cc80742
commit
e0589ec65b
1 changed files with 4 additions and 13 deletions
|
@ -4,6 +4,7 @@ with lib;
|
|||
|
||||
let
|
||||
cfg = config.services.do-agent;
|
||||
|
||||
in
|
||||
{
|
||||
options.services.do-agent = {
|
||||
|
@ -11,23 +12,13 @@ in
|
|||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = [ pkgs.do-agent ];
|
||||
systemd.packages = [ pkgs.do-agent ];
|
||||
|
||||
systemd.services.do-agent = {
|
||||
description = "DigitalOcean Droplet Metrics Agent";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
after = [ "network-online.target" ];
|
||||
wants = [ "network-online.target" ];
|
||||
serviceConfig = {
|
||||
ExecStart = "${pkgs.do-agent}/bin/do-agent --syslog";
|
||||
Restart = "always";
|
||||
OOMScoreAdjust = -900;
|
||||
SyslogIdentifier = "DigitalOceanAgent";
|
||||
PrivateTmp = "yes";
|
||||
ProtectSystem = "full";
|
||||
ProtectHome = "yes";
|
||||
NoNewPrivileges = "yes";
|
||||
DynamicUser = "yes";
|
||||
ExecStart = [ "" "${pkgs.do-agent}/bin/do-agent --syslog" ];
|
||||
DynamicUser = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue