<commit_before>{config, pkgs}: 
let
  startingDependency = if config.services.gw6c.enable then "gw6c" else "network-interfaces";
  cfg = config.services.bind;
  concatMapStrings = pkgs.lib.concatMapStrings;

  namedConf = 
  (''
    acl cachenetworks { ${concatMapStrings (entry: " ${entry}; ") cfg.cacheNetworks} };
    acl badnetworks { ${concatMapStrings (entry: " ${entry}; ") cfg.blockedNetworks} };

    options {
      allow-query { cachenetworks; };
      blackhole { badnetworks; };
      forward first;
      forwarders { ${concatMapStrings (entry: " ${entry}; ") config.networking.nameservers} };
      directory "/var/run/named";
      pid-file "/var/run/named/named.pid";
    };

  '')
  + 
  (concatMapStrings 
    (_entry:let entry={master=true;slaves=[];masters=[];}//_entry; in
      ''
        zone "${entry.name}" {
	  type ${if entry.master then "master" else "slave"};
	  file "${entry.file}";
	  ${ if entry.master then
	     ''
	       allow-transfer {
	         ${concatMapStrings (ip: ip+";\n") entry.slaves}
	       };
	     ''
	     else
	     ''
	       masters {
	         ${concatMapStrings (ip: ip+";\n") entry.masters}
	       };
	     ''
	  }
	};
      ''
    )<commit_msg>Fixed authoritative zone ACL, enabled IPv6<commit_after>{config, pkgs}: 
let
  startingDependency = if config.services.gw6c.enable then "gw6c" else "network-interfaces";
  cfg = config.services.bind;
  concatMapStrings = pkgs.lib.concatMapStrings;

  namedConf = 
  (''
    acl cachenetworks { ${concatMapStrings (entry: " ${entry}; ") cfg.cacheNetworks} };
    acl badnetworks { ${concatMapStrings (entry: " ${entry}; ") cfg.blockedNetworks} };

    options {
      listen-on {any;};
      listen-on-v6 {any;};
      allow-query { cachenetworks; };
      blackhole { badnetworks; };
      forward first;
      forwarders { ${concatMapStrings (entry: " ${entry}; ") config.networking.nameservers} };
      directory "/var/run/named";
      pid-file "/var/run/named/named.pid";
    };

  '')
  + 
  (concatMapStrings 
    (_entry:let entry={master=true;slaves=[];masters=[];}//_entry; in
      ''
        zone "${entry.name}" {
	  type ${if entry.master then "master" else "slave"};
	  file "${entry.file}";
	  ${ if entry.master then
	     ''
	       allow-transfer {
	         ${concatMapStrings (ip: ip+";\n") entry.slaves}
	       };
	     ''
	     else
	     ''
	       masters {
	         ${concatMapStrings (ip: ip+";\n") entry.masters}
	       };
	     ''
	  }
	  allow-query { any; };
	};
      ''
    )
{'fraction_non_alphanumeric': 0.16726261422328167, 'fraction_numerical': 0.0023837902264600714, 'mean_word_length': 2.5118549511854953, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3704369', 'n_tokens_mistral': 870, 'n_tokens_neox': 818, 'n_words': 155}