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.

23 lines
490 B
Nix
Raw Normal View History

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