31 lines
630 B
Nix
31 lines
630 B
Nix
{
|
|
config,
|
|
pkgs,
|
|
outputs,
|
|
constants,
|
|
...
|
|
}:
|
|
|
|
{
|
|
services.netdata = {
|
|
enable = true;
|
|
config = {
|
|
stream = {
|
|
enabled = "yes";
|
|
destination = "${constants.hosts.cryodev-main.ip}:${toString constants.services.netdata.port}";
|
|
"api key" = config.sops.placeholder."netdata/stream/child-uuid";
|
|
};
|
|
};
|
|
};
|
|
|
|
# Make sure sops is enabled/imported for this host to handle the secret
|
|
imports = [ outputs.nixosModules.sops ];
|
|
|
|
sops = {
|
|
defaultSopsFile = ../secrets.yaml;
|
|
secrets."netdata/stream/child-uuid" = {
|
|
owner = "netdata";
|
|
group = "netdata";
|
|
};
|
|
};
|
|
}
|