nixpkgs/nixos/modules/services/monitoring/do-agent.nix

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

34 lines
530 B
Nix
Raw Permalink Normal View History

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