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
venus service better description
venus service: using systemd timer instead of cronjob
Make fail2ban a normal systemd service in nixos module.
Limit the location where fail2ban service can write to (only /var/run/fail2ban).
Limit the capabilities of what fail2ban service can do. Taken from ArchLinux wiki.
venus: Support https
nixos-rebuild: Allow to use --repair.

Unfortunately, the flag only works directly and without the daemon, so
this adds an extra variable $repair, to avoid the daemon. This is to
avoid to iterate through the $extraBuildFlags just to test whether
"--repair" exists.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
Fix ReadWriteDirectories for fail2ban, added /var/tmp.
Add OpenSMTPD service option
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).