Sync after installing the boot loader

Previously we synced just before calling switch-to-configuration.
That prevents corruption of the Nix store, but it can leave the boot
loader configuration and kernel files in /boot corrupted.  So do the
sync after installing the boot loader.
pam: adding otpw optional, default false
Setting pam otpw *after* pam_unix, for dovecot failed auth messages.

I think it's nice that it first asks the usual password, and then offers the
otpw one if enabled. That enables dovecot to show the last pam prompt.

I also add the dovecot option for that.
Remove /etc lock files at boot time
lighttpd: restart service if config changes

Using /etc/lighttpd.conf "hides" the config file from NixOS so that it
will not automatically restart the service when its config file changes.
So don't do that.
fixes #127
Fix missed kernel->kernelDev change

Signed-off-by: Shea Levy <shea@shealevy.com>
Use the new net.ifnames kernel command line flag to disable persistent interface names

Signed-off-by: Shea Levy <shea@shealevy.com>
Merge branch 'lighttpd' of git://github.com/bjornfor/nixos into upstream-master

Moves config file into the store rather than polluting etc, which has a
number of benefits

Signed-off-by: Shea Levy <shea@shealevy.com>
Let resolvconf 'restart' the nscd service instead of 'reload'ing it.

Sometimes nscd starts up before a /etc/resolv.conf file has been written, and
apparently triggering a cache flush (reload) is not good enough to make it
recover from that problem. To remedy the issue, we restart the service instead.
See <https://github.com/NixOS/nixos/issues/34> for further details.
modules/config/networking.nix: strip trailing whitespace
Enable sudoedit
Create an empty /etc/resolv.conf to shut up nscd
Revert "Use the new net.ifnames kernel command line flag to disable persistent interface names"

As @edolstra pointed out, this behavior is not equivalent to what we had
before as the kernel command line parameter won't take effect until the
next boot. Probably it's not likely that someone will make this change
and then add a network card before rebooting, but might as well support
that since we can.

This reverts commit f7563698dfcc4621cc996142b046c6a4941e68ec.

Signed-off-by: Shea Levy <shea@shealevy.com>
xbmc: Use /var/run/lirc/lircd as lirc socket

The latest version of the lirc daemon uses /var/run/lirc/lircd, not
/dev/lircd that xbmc uses as default.
PostgreSQL: Don't specify a default PostgreSQL package

The user should specify which major version to use
(e.g. "services.postgresql.package = pkgs.postgresql92").  We can't
really provide a sensible default, because such a default would have
to be updated from time to time, and there is no automated upgrade
procedure.  So leave upgrading to the user.
xsession: remove duplicate sourcing of /etc/profile
remove redundant if
xsession: add config option to let systemd handle lid/power events
add e17 desktop manager

desktop-manager is a bit misleading in this case as there is no
session yet and most apps are still missing. This can eventually
grow further once more e17 apps get packaged for nix.

However, for now, I need to initialize some e17 dbus services to
have the "terminology" terminal emulator provide gfx previews.