anchor.diff:  
     options = {
     
  -    networking.wireless.enable = mkOption {
  -      default = false;
  -      description = ''
  -        Whether to start <command>wpa_supplicant</command> to scan for
  -        and associate with wireless networks.  Note: NixOS currently
  -        does not generate <command>wpa_supplicant</command>'s
  -        configuration file, <filename>${configFile}</filename>.  You
  -        should edit this file yourself to define wireless networks,
  -        WPA keys and so on (see
  -        <citerefentry><refentrytitle>wpa_supplicant.conf</refentrytitle>
  -        <manvolnum>5</manvolnum></citerefentry>).
  -      '';
  -    };
  -
       networking.WLANInterface = mkOption {
         default = "";
         description = "Obsolete. Use <option>networking.wireless.interfaces</option> instead.";
       };
   
  -    networking.wireless.interfaces = mkOption {
  -      default = [];
  -      example = [ "wlan0" "wlan1" ];
  -      description = ''
  -        The interfaces <command>wpa_supplicant</command> will use.  If empty, it will
  -        automatically use all wireless interfaces.
  -      '';
  +    networking.wireless = {
  +      enable = mkOption {
  +        default = false;
  +        description = ''
  +          Whether to start <command>wpa_supplicant</command> to scan for
  +          and associate with wireless networks.  Note: NixOS currently
  +          does not generate <command>wpa_supplicant</command>'s
  +          configuration file, <filename>${configFile}</filename>.  You
  +          should edit this file yourself to define wireless networks,
  +          WPA keys and so on (see
  +          <citerefentry><refentrytitle>wpa_supplicant.conf</refentrytitle>
  +          <manvolnum>5</manvolnum></citerefentry>).
  +        '';
  +      };
  +
  +      interfaces = mkOption {
  +        default = [];
  +        example = [ "wlan0" "wlan1" ];
  +        description = ''
  +          The interfaces <command>wpa_supplicant</command> will use.  If empty, it will
  +          automatically use all wireless interfaces.
  +        '';
  +      };
  +
  +      driver = mkOption {
  +        default = "";
  +        example = "nl80211";
  +        description = "force a specific wpa_supplicant driver";
  +      };
  +
  +      userControlled = {
  +        enable = mkOption {
  +          default = false;
  +          description = ''
  +            Allow normal users to control wpa_supplicant through wpa_gui or wpa_cli.
  +            This is useful for laptop users that switch networks a lot.
  +
  +            When you want to use this, make sure ${configFile} doesn't exist.
  +            It will be created for you.
  +
  +            Currently it is also necesarry to explicitly specify networking.wireless.interfaces
  +          '';
  +        };
  +
  +        group = mkOption {
  +          default = "wheel";
  +          example = "network";
  +          type = types.string;
  +          description = "members of this group can control wpa_supplicant";
  +        };
  +      };
       };
  -
     };
   
   
     ###### implementation
     
  -  config = mkIf config.networking.wireless.enable {
  +  config = mkIf cfg.enable {
   
       environment.systemPackages =  [ pkgs.wpa_supplicant ];
   
  
positive.code:             '' else ''
                ifaces="${concatStringsSep " -N " (map (i: "-i${i}") ifaces)}"
              ''}
              exec wpa_supplicant -s -u -c ${configFile} $ifaces
            '';
        };
    
  
negative.code: 
  let
  
    cfg = config.networking.wireless;
    configFile = "/etc/wpa_supplicant.conf";
  
    ifaces =
      cfg.interfaces ++
      optional (config.networking.WLANInterface != "") config.networking.WLANInterface;
  
  in
  