diff options
author | Shea Levy <shea@shealevy.com> | 2014-05-05 16:30:51 -0400 |
---|---|---|
committer | Nicolas B. Pierron <nicolas.b.pierron@gmail.com> | 2015-03-12 23:42:57 +0100 |
commit | 0a0a29fd0bb8329b33a0b2bb25627d3b3d9b7368 (patch) | |
tree | 1a07ea2e9b7f1d691ad084871e515b7a8b6b766f /lib/types.nix | |
parent | e3eff53037f1b7abb7a44ba72f59f20649023642 (diff) | |
download | nixpkgs-0a0a29fd0bb8329b33a0b2bb25627d3b3d9b7368.tar nixpkgs-0a0a29fd0bb8329b33a0b2bb25627d3b3d9b7368.tar.gz nixpkgs-0a0a29fd0bb8329b33a0b2bb25627d3b3d9b7368.tar.bz2 nixpkgs-0a0a29fd0bb8329b33a0b2bb25627d3b3d9b7368.tar.lz nixpkgs-0a0a29fd0bb8329b33a0b2bb25627d3b3d9b7368.tar.xz nixpkgs-0a0a29fd0bb8329b33a0b2bb25627d3b3d9b7368.tar.zst nixpkgs-0a0a29fd0bb8329b33a0b2bb25627d3b3d9b7368.zip |
Add comments about the module system interface
Ideally the module system could be configured pretty much completely by the contents of the modules themselves, so add comments about avoiding complicating it further and possibly removing now-redundant configurability from the existing interface.
Diffstat (limited to 'lib/types.nix')
-rw-r--r-- | lib/types.nix | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/types.nix b/lib/types.nix index 4d336c1d946..32f332ed21b 100644 --- a/lib/types.nix +++ b/lib/types.nix @@ -200,7 +200,12 @@ in rec { let coerce = def: if isFunction def then def else { config = def; }; modules = opts' ++ map (def: { _file = def.file; imports = [(coerce def.value)]; }) defs; - in (evalModules { inherit modules; args.name = last loc; prefix = loc; }).config; + in (evalModules { + inherit modules; + # !!! See comment about args in lib/modules.nix + args.name = last loc; + prefix = loc; + }).config; getSubOptions = prefix: (evalModules { modules = opts'; inherit prefix; # FIXME: hack to get shit to evaluate. |