0eaa97ffad
GitOrigin-RevId: c59ea8b8a0e7f927e7291c14ea6cd1bd3a16ff38
25 lines
494 B
Nix
25 lines
494 B
Nix
{ 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;
|
|
};
|
|
};
|
|
};
|
|
}
|