b450903751
GitOrigin-RevId: 74a1793c659d09d7cf738005308b1f86c90cb59b
25 lines
506 B
Nix
25 lines
506 B
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
with lib;
|
|
|
|
let
|
|
cfg = config.services.do-agent;
|
|
|
|
in
|
|
{
|
|
options.services.do-agent = {
|
|
enable = mkEnableOption (lib.mdDoc "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;
|
|
};
|
|
};
|
|
};
|
|
}
|