3
0
Fork 0
forked from mirrors/nixpkgs
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.

26 lines
506 B
Nix
Raw Normal View History

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