I have a netbook which I use to connect to my WPA2-protected wifi network at home. Here is my experience of setting up wicd and wireless connection.

edit Check the hardware

Check that your wireless adapter is working

[root@pokemon:~]# ifconfig -a | grep -A 5 wlan
wlan0     Link encap:Ethernet  HWaddr 00:16:EB:19:DC:A0  
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:25756 errors:0 dropped:0 overruns:0 frame:0
          TX packets:22685 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:7196191 (6.8 Mb)  TX bytes:7611727 (7.2 Mb)

If not, consult dmesg. One possible reason is missing firmware. Sometimes you may need to enable it explicitly, see networking.enableIntel2100BGFirmware option as an example.

edit Enable wicd, disable other networking

Wicd is fully-functional network manager, it takes responsibility for connecting, launching dhcp clients, storing passwords, etc. To prevent conflicts, disable other network agents

networking = {
  ...
  interfaceMonitor.enable = false;
  enableWLAN = false; # Don't run wpa_supplicant (wicd will do it when necessary)
  useDHCP = false; # Don't run dhclient on wlan0
  wicd.enable = true;
  ...
};

edit Setup wicd

Now rebuild nixos, switch to new configuration and launch wicd gui.

[root@pokemon:~]# wicd-gtk --no-tray

If it doesn't see wireless networks, open preferences and check wireless interface name. Enter correct value (like "wlan0") if needed.

That's it. Now use gui to find your network, enter passwords and connect to it.