NixOS VM tests: Use 9p instead of CIFS
nixos-vm: switch to qemu for disk images too :)
grub: Add mdadm to search path.

Grub uses mdadm to find out the device it is on, especially when mdadm itself
resides in a separate boot partition. When bootstrapping from a NixOS
installation CD, it's not a big issue because usually the paths from the Nix
store of the installation CD are matching with the ones in the chrooted
environment.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
Start httpd synchronously

This ensures that when "start httpd" returns, Apache is actually
listening.

http://hydra.nixos.org/build/5499393
Give more memory to the KDE test

http://hydra.nixos.org/build/5499387
Fix the rebuildCD test

http://hydra.nixos.org/build/5500743
Remove outdated comment

Password-based remote root logins are not allowed anyway.
Fix the sshd check in the rebuildCD test

Also reduce the amount of memory.
systemd-vconsole-setup: Add missing wantedBy

Reported by Kirill Elagin.
Generate /etc/passwd and /etc/group at build time

This is a rather large commit that switches user/group creation from
using useradd to just generating the contents of /etc/passwd and /etc/group,
and then on activation merging the generated files with the files that exist in
the system. This makes the user activation process much cleaner, in my opinion.

The users.extraUsers.<user>.uid and users.extraGroups.<group>.gid must all be
properly defined (if <user>.createUser is true, which is by default). My pull
request adds a lot of uids/gids to config.ids to solve this problem for
existing nixos services, but there might be configurations that break because
this change. However, this will be discovered during the build.

The commit removes the options <user>.isSystemUser and <user>.isAlias since
they don't make sense when generating /etc/passwd. It adds <group>.members as a
complement to <user>.extraGroups and <user>.passwordFile for setting a user's
password from an encrypted (shadow-style) file. It also adds users.mutableUsers
which is false by default. If set to true, the generated passwd and group
files will not be merged with the system files on activation. Instead they will
simply replace the system files.

The merging of the files is simplistic. It just looks at the user/group names.
If a user/group exists both on the system and in the generated files, the
system entry will be kept un-changed and the generated entries will be ignored.
The merging itself is performed with the help of vipw/vigr to properly lock
the account files during edit.

I have tested this on a couple of different systems and it seems to work fine
so far. If you think this is a good idea, please test it. This way of adding
local users has been discussed in issue #103 (and this commit solves that
issue).