1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-25 03:17:13 +00:00
nixpkgs/nixos/modules/services/monitoring/do-agent.nix

26 lines
494 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 "do-agent, the DigitalOcean droplet metrics agent";
};
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
};
};
};
}