anchor.diff:    # /var/lib/misc is for dnsmasq.leases.
     stateDirs = "/var/lib/NetworkManager /var/lib/dhclient /var/lib/misc";
   
  -  useDnsmasq = cfg.dns == "dnsmasq";
  -  useResolved = cfg.dns == "systemd-resolved";
  -
  -  rcman = if useResolved then "unmanaged" else "resolvconf";
  +  dns =
  +    if cfg.useDnsmasq then "dnsmasq"
  +    else if config.services.resolved.enable then "systemd-resolved"
  +    else if config.services.unbound.enable then "unbound"
  +    else "default";
   
     configFile = writeText "NetworkManager.conf" ''
       [main]
       plugins=keyfile
       dhcp=${cfg.dhcp}
  -    dns=${cfg.dns}
  -    rc-manager=${rcman}
  +    dns=${dns}
   
       [keyfile]
       ${optionalString (cfg.unmanaged != [])
  
positive.code:         description = ''
            A list of scripts which will be executed in response to  network  events.
          '';
        };
  
        extraConfig = mkOption {
          type = types.lines;
          default = "";
          description = "Additional configuration added verbatim to the configuration file.";
        };
      };
    };
  
negative.code:     ipv6.ip6-privacy=2
      ethernet.cloned-mac-address=${cfg.ethernet.macAddress}
      wifi.cloned-mac-address=${cfg.wifi.macAddress}
    '';
  
    /*
  