Files

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

31 lines
526 B
Nix
Raw Permalink Normal View History

2025-10-09 14:15:47 +02:00
{
config,
lib,
pkgs,
...
}:
let
cfg = config.services.do-agent;
in
{
options.services.do-agent = {
enable = lib.mkEnableOption "do-agent, the DigitalOcean droplet metrics agent";
};
config = lib.mkIf cfg.enable {
systemd.packages = [ pkgs.do-agent ];
systemd.services.do-agent = {
wantedBy = [ "multi-user.target" ];
serviceConfig = {
ExecStart = [
""
"${pkgs.do-agent}/bin/do-agent --syslog"
];
DynamicUser = true;
};
};
};
}