-
-
Save RaghavSood/e3b3287bacd078aa8720f4f021d59ad0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{pkgs ? import<nixpkgs>, nodes, lib, ...}: { | |
services.netdata = { | |
enable = true; | |
config = { | |
registry = { | |
"enabled" = "yes"; | |
"registry to announce" = "http://${(lib.elemAt nodes.ch-misc.config.networking.interfaces.eth0.ipv4.addresses 0).addres | |
s}:19999"; | |
}; | |
}; | |
}; | |
networking.firewall.extraCommands = '' | |
iptables -A nixos-fw -s 167.99.64.211/32 -p tcp -m tcp --dport 19999 -m comment --comment netdata -j nixos-fw-accept | |
${lib.concatMapStringsSep "\n" (s: ''${(lib.elemAt s.config.networking.interfaces.eth0.ipv4.addresses 0).address}'') nodes | |
} | |
''; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment