Fully declarative modules

Building on top of #2540, this allows modules to specify the path of the nixpkgs lib to be used for the evaluation. In addition, if a nix with https://github.com/NixOS/nix/commit/c273c15cb13bb86420dda1e5341a4e19517532b5 is used, they can also specify the scope to use when importing modules, which in conjunction with https://github.com/NixOS/nix/commit/62a6eeb1f3da0a5954ad2da54c454eb7fc1c6e5d allows the nix path to be set for the module evaluation.