Skip to content

Instantly share code, notes, and snippets.

@RaghavSood RaghavSood/working_sample.nix Secret

Created Jun 6, 2020
What would you like to do?
{pkgs ? import<nixpkgs>, nodes, lib, ...}: {
services.netdata = {
enable = true;
config = {
registry = {
"enabled" = "yes";
"registry to announce" = "http://${(lib.elemAt 0).addres
networking.firewall.extraCommands = ''
iptables -A nixos-fw -s -p tcp -m tcp --dport 19999 -m comment --comment netdata -j nixos-fw-accept
${lib.concatMapStringsSep "\n" (s: ''iptables -A nixos-fw -s ${(lib.elemAt nodes.${s}.config.networking.interfaces.eth0.
ipv4.addresses 0).address}/32 -p tcp -m tcp --dport 19999 -m comment --comment netdata -j nixos-fw-accept'') (lib.attrNames nod
es) }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.