calling zfs mount -a again doesn't make sense
NFS: Use network-online.target instead of remote-fs-pre.target

Turns out that remote-fs-pre.target is not actually "wanted" anywhere,
so statd is not started before remote filesystems are mounted.  But
remote filesystems do "want" network-online.target, so we can use that
to pull in statd and idmapd.

Not sure if this is really the right thing to do, but it works for
now.  Background:

  https://bugzilla.redhat.com/show_bug.cgi?id=787314

http://hydra.nixos.org/build/5542230
Start sm-notify/statd atfer nfsd

The README of nfs-utils explains that we must not notify clients
before nfsd is running, otherwise they may fail to reclaim their
locks.  OTOH it's allowed but not required to start "rpc.statd
--no-notify" before nfsd.  So for simplicity we do both after starting
nfsd.
Don't pull in the old qemu-kvm
NFS test: Set a fixed fsid

Otherwise clients get a "Stale NFS handle" error after the server
reboots.  Not clear why this is the case, since the fsid shouldn't
change across reboots...
Add a test for NFSv4

However it currently fails because locking seems to be broken with
NFSv4.
Disable the installer.swraid test

This fails randomly for unknown reasons,
e.g. http://hydra.nixos.org/build/5542510.
Work around "Input/output error" opening /dev/ttyS0

E.g. http://hydra.nixos.org/build/5541847

This is a random occurence, maybe due to a race with something else.
So just retry until it works.
Disable the mpich test

It hasn't succeeded in a long time.
Fix the installer tests

E.g. http://hydra.nixos.org/build/5561399
Bump the NixOS version number to 13.07

This is in preparation of making a stable release/branch.  The version
number is <YY>.<MM>, Ubuntu style, denoting the intended release
year/month.  It also has a release codename ("Aardvark").
Include all of KDE in the KDE test
Disable the trac test

It hasn't worked in ages.
Fix the misc test
Fix ISO generation

The volume label cannot be longer than 32 characters.
Add apcupsd service

apcupsd is a daemon for controlling APC UPSes. It is very simple to
configure. If you have an USB based UPS, the default settings should be
useable without further adjustments:

  services.apcupsd.enable = true;

This will give you autodetection of USB UPSes, network access limited to
localhost (for security) and the shutdown sequence will be started when
the system when the battery level is below 50 percent, or when the UPS
has calculated that it has 5 minutes or less of remaining power-on time.

You can provide your own configuration file contents with this option:

  services.apcupsd.configText = "contents of apcupsd.conf";

Bug/annoyance 1: When apcupsd calls "wall" (on powerfail etc. events),
it prints an error message because stdout is not connected to a tty (it
is connected to the journal):

  wall: cannot get tty name: Inappropriate ioctl for device

The message still gets through though, to ctrl-alt-f[1-6] terminals.

Bug/annoyance 2: apcupsd tries to call "mail" (on powerfail etc.
events), and that fails because I'm not passing in any mail program at
the moment (because that would require more configuration options). A
solution to this would be to simply let the user fully configure the
apcupsd event handling logic in nix.
Merge pull request #204 from bjornfor/apcupsd-service

Add apcupsd service
Add uptime module

Signed-off-by: Shea Levy <shea@shealevy.com>
Only include /bin/sh (not all of /bin) in the chroot

Signed-off-by: Shea Levy <shea@shealevy.com>
Allow specifying packages whose closures should be in the chroot

Signed-off-by: Shea Levy <shea@shealevy.com>