NixOS/nixos — pull request #262 by offlinehacker (2013-09-26 14:48:34+00:00)
Title: stage-2-init: create /var/lib and /var/db at boot, so some modules that create user home folders here don't fail

It was pretty nasty bug, that was hard to spot. But as soon as i started doing vm tests i saw that happening.

For example lets say this module snippet from bacula (to show this is not related only with my modules):

```
libDir = "/var/lib/bacula";

users.extraUsers.bacula = {
group = "bacula";
uid = config.ids.uids.bacula;
home = "${libDir}";
createHome = true;
description = "Bacula Daemons user";
shell = "${pkgs.bash}/bin/bash";
};
```

There's no way this home will be created on boot, because when `useradd` tries to create home `/var/lib/` does not yet exist.