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>
Documentation improvement

Signed-off-by: Shea Levy <shea@shealevy.com>
Mount /var and some other filesystems automatically in stage 1

Bad things happen if /var is mounted in a late stage.
Set permissions on /var/log/journal properly

This makes the system journal readable by users in the
systemd-journal, wheel and adm groups.  It also allows users to read
their own journals.

Note that this doesn't change the permissions of existing journals.
modules/services/networking/dhcpcd.nix: add "extraConfig" option

This option allows administrators to add verbatim text to the generated
config file. I use this feature, for instance, to disable the default
route normally added by dhcpcd for certain interfaces.
apcupsd-service: add services.apcupsd.hooks option

Each attribute in this option should name an apcupsd event and the
string value it contains will be executed in a shell in response to that
event. See "man apccontrol" for the list of events and what they
represent.

Now it is easy to hook into the apcupsd event system:

  services.apcupsd.hooks = {
    onbattery  = ''# shell commands to run when the onbattery event is emitted'';
    doshutdown = ''# shell commands to notify that the computer is shutting down'';
  };
apcupsd-service: create missing /run/apcupsd/ directory

apcupsd complains about this missing directory when it is starting the
shutdown procedure.
apcupsd-service: put UPS in hibernate mode when shutting down

This adds a special systemd service that calls "apcupsd --killpower"
(put UPS in hibernate mode) just before shutting down the system.
Without this command, the UPS will stay on until the battery is
completely empty.
apcupsd-service: workaround for "A stop job is running for UPS daemon"

When apcupsd has initiated a shutdown, systemd always ends up waiting
for it to stop ("A stop job is running for UPS daemon"). This is weird,
because in the journal one can clearly see that apcupsd has received the
SIGTERM signal and has already quit (or so it seems). This reduces the
wait time from 90 seconds (default) to just 5. Then systemd kills it
with SIGKILL.
apcupsd-service: "UPS daemon" => "APC UPS daemon" description update

Sometimes systemd only prints the service description. Then it is nice
to know which UPS daemon we're dealing with.
Ensure /var/log/journal permission bits are set

Ensure permission bits are (re)set on each system activation with
explicit chmod call.

mkdir -m MODE PATH will only set the permission bits if PATH is
*created*, which means users that have old NixOS versions will continue
to have the old 700 permissions on /var/log/journal until they chmod
manually. With this commit the permissions will be set to 755 on system
activation.
Revert "Allow specifying packages whose closures should be in the chroot"

This reverts commit be3d498b1891339ffceb3f54f749d3d5fa343429.
Revert "Only include /bin/sh (not all of /bin) in the chroot"

This reverts commit 883d310bac6cc6b7a136786688b6b55079558cb7.
New kernel iso/system_tarball now use 3.10 in stead of 3.7, which had been removed.
pulseaudio service: Use the configured pulseaudio package instead of the default.
x11 session: Don't start pulseaudio if it already is running system-wide
Fix indentation / tabs
Lower the default console log level

It used to be set to 7 (debug) so you get lots of crap on the console.
The new value of 4 is also what Ubuntu uses.  Red Hat uses 3.

A nice side effect is that it's more likely that the LUKS passphrase
prompt doesn't get clobbered by kernel log messages.
new venus service