anchor.diff:        { assertion = !dynamicHostsEnabled || (dynamicHostsEnabled && cfg.dns == "dnsmasq");
           message = ''
             To use networking.networkmanager.dynamicHosts you also need to set
  -          networking.networkmanager.dns = "dnsmasq"
  +          `networking.networkmanager.dns = "dnsmasq"`
           '';
         }
       ];
  
positive.code: 
      [device]
      wifi.scan-rand-mac-address=${if cfg.wifi.scanRandMacAddress then "yes" else "no"}
  
      ${cfg.extraConfig}
    '';
  
negative.code:     networkmanager-openconnect
      networkmanager-openvpn
      networkmanager-vpnc
     ] ++ optional (!delegateWireless && !enableIwd) wpa_supplicant;
  
    dynamicHostsEnabled =
      cfg.dynamicHosts.enable && cfg.dynamicHosts.hostsDirs != {};
  
    delegateWireless = config.networking.wireless.enable == true && cfg.unmanaged != [];
  
    enableIwd = cfg.wifi.backend == "iwd";
  
    # /var/lib/misc is for dnsmasq.leases.
    stateDirs = "/var/lib/NetworkManager /var/lib/dhclient /var/lib/misc";
  