This is a work-in-progress and might not even be functional at the moment. Once we have deployed this into production, we will remove this notice.
This flake is a fork and rewrite of the official nixpkgs datadog-agent
package and its associated NixOS module.
The goal of this fork is to test a new package/module interface before proposing its merge upstream into nixpkgs.
We are using this flake internally at Quartzy, where we use Nix to manage our entire infrastructure from development to production. If you'd like to help advance scientific research while getting to work with Nix, we are hiring.
This is a standard Nix flake with flake-compat. If you want to use the flakes, add this repo as you would any other flake. This flake has three outputs:
packages.<system>.default
: the Datadog environment, described in more detail below.overlays.default
: an overlay making the above package available under the top level keypkgs.datadog
.nixosModules.default
: a NixOS module to manage the Datadog Agent(s) and configs on a NixOS machine.
If you are not using flakes, compatibility is provided via flake-compat. Use niv
or a URL fetcher to get the source of this repository, then just import default.nix
, module.nix
or overlay.nix
and
use as you would any other package, overlay, or NixOS module.
If all you want to do is setup Datadog on your server:
{
services.datadog.enable = true;
}
The NixOS module will try to detect which services you have enabled, and enable their associated integrations automatically. You can override this behavior by passing in your own Datadog environment using the package helper functions:
{ pkgs, ... }:
{
services.datadog = {
enable = true;
package = pkgs.datadog.withIntegrations ({ all, enabled, ... }: with all; enabled ++ [
nginx
php-fpm
postgres
redisdb
]);
};
}
You can see the full list of integrations in ./integrations.nix.