NixOS/nixpkgs — pull request #5415 by nbp (2014-12-20 18:35:00+00:00)
Title: Nixos options submodules

This pull request is made on top of the pull request #5405, it solve the issue https://github.com/NixOS/nixos/issues/192 . So, before we had something like:

```
$ nixos-option systemd.services.rpcbind.enable
An error occurred while looking for attribute names.
true
$ nixos-option fileSystems./.fsType
error: attempt to call something which is not a function but a set, at (string):1:1
```

and now we have

```
$ nixos-option systemd.services.rpcbind.enable
Value:
true

Default:
true

[…]

$ nixos-option fileSystems./.fsType
Value:
"ext4"

Default:
"auto"

[…]
```

The way this branch is doing is by walking the option and the config at the same time to build accessors which are then inlined in the code which is given to the next calls of nix-instantiate. These accessors are based on either the attribute name when this is a definition, or on the `(….type.getSubOptions "")`.