My personal project and infrastructure archive
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
nomicon/infra/libkookie/nixpkgs/unstable/nixos/modules/services/monitoring/do-agent.nix

25 lines
494 B

{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.services.do-agent;
in
{
options.services.do-agent = {
enable = mkEnableOption "do-agent, the DigitalOcean droplet metrics agent";
};
config = 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;
};
};
};
}