anchor.diff:    # /var/lib/misc is for dnsmasq.leases.
     stateDirs = "/var/lib/NetworkManager /var/lib/dhclient /var/lib/misc";
   
  -  configFile = writeText "NetworkManager.conf" ''
  +  configFile = pkgs.writeText "NetworkManager.conf" ''
       [main]
       dhcp=${pkgs.networkmanager.dhcp-client}
       plugins=keyfile
  
positive.code: { config, lib, pkgs, ... }:
  
  with pkgs;
  with lib;
  
  let
    cfg = config.networking.networkmanager;
  
negative.code:     fi
    '';
  
    ns = xs: pkgs.writeText "nameservers" (
      concatStrings (map (s: "nameserver ${s}\n") xs)
    );
  
    overrideNameserversScript = pkgs.writeScript "02overridedns" ''
      #!/bin/sh
      tmp=`${pkgs.coreutils}/bin/mktemp`
      ${pkgs.gnused}/bin/sed '/nameserver /d' /etc/resolv.conf > $tmp
      ${pkgs.gnugrep}/bin/grep 'nameserver ' /etc/resolv.conf | \
        ${pkgs.gnugrep}/bin/grep -vf ${ns (cfg.appendNameservers ++ cfg.insertNameservers)} > $tmp.ns
      ${optionalString (cfg.appendNameservers != []) "${pkgs.coreutils}/bin/cat $tmp $tmp.ns ${ns cfg.appendNameservers} > /etc/resolv.conf"}
      ${optionalString (cfg.insertNameservers != []) "${pkgs.coreutils}/bin/cat $tmp ${ns cfg.insertNameservers} $tmp.ns > /etc/resolv.conf"}
      ${pkgs.coreutils}/bin/rm -f $tmp $tmp.ns
    '';
  
    dispatcherTypesSubdirMap = {
  