anchor.diff:        group = "networkmanager";
       }];
   
  -    services.resolved = lib.mkIf useResolved {
  -      enable = true;
  -    };
  -
       systemd.packages = cfg.packages;
   
       systemd.services."network-manager" = {
         wantedBy = [ "network.target" ];
  -      wants = lib.mkIf useResolved [ "systemd-resolved.service" ];
         restartTriggers = [ configFile ];
   
         preStart = ''
  
positive.code: 
        ethernet.macAddress = macAddressOpt;
        wifi.macAddress = macAddressOpt;
  
        dispatcherScripts = mkOption {
          type = types.listOf (types.submodule {
  
negative.code:   # /var/lib/misc is for dnsmasq.leases.
    stateDirs = "/var/lib/NetworkManager /var/lib/dhclient /var/lib/misc";
  
    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=${dns}
  
      [keyfile]
      ${optionalString (cfg.unmanaged != [])
  