feat: make modules/distributed-config.nix extensible; don't run telegraf on containers because of missing memlock

This commit is contained in:
oddlama 2023-12-25 17:14:32 +01:00
parent 2120aefef5
commit 3036c53d87
No known key found for this signature in database
GPG key ID: 14EFE510775FE39A
3 changed files with 61 additions and 25 deletions

View file

@ -58,6 +58,13 @@ in {
};
config = mkIf (!minimal && cfg.enable) {
assertions = [
{
assertion = !config.boot.isContainer;
message = "Containers don't support telegraf because memlock is not enabled.";
}
];
nodes.${cfg.influxdb2.node} = {
# Mirror the original secret on the influx host
age.secrets."telegraf-influxdb-token-${config.node.name}" = {
@ -135,7 +142,9 @@ in {
kernel_vmstat = {};
linux_sysctl_fs = {};
mem = {};
net = {};
net = {
ignore_protocol_stats = true;
};
netstat = {};
nstat = {};
processes = {};