anchor.diff:  
         wifi = {
           macAddress = macAddressOpt;
  +
  +        backend = mkOption {
  +          type = types.enum [ "wpa_supplicant" "iwd" ];
  +          default = "wpa_supplicant";
  +          description = ''
  +            Specify the Wi-Fi backend used for the device.
  +            Currently supported are <option>wpa_supplicant</option> or <option>iwd</option> (experimental).
  +          '';
  +        };
   
           powersave = mkOption {
             type = types.nullOr types.bool;
  
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";
  