summaryrefslogtreecommitdiffstats
path: root/lib/modules.nix
diff options
context:
space:
mode:
authorShea Levy <shea@shealevy.com>2014-05-05 16:30:51 -0400
committerNicolas B. Pierron <nicolas.b.pierron@gmail.com>2015-03-12 23:42:57 +0100
commit0a0a29fd0bb8329b33a0b2bb25627d3b3d9b7368 (patch)
tree1a07ea2e9b7f1d691ad084871e515b7a8b6b766f /lib/modules.nix
parente3eff53037f1b7abb7a44ba72f59f20649023642 (diff)
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/modules.nix')
-rw-r--r--lib/modules.nix16
1 files changed, 14 insertions, 2 deletions
diff --git a/lib/modules.nix b/lib/modules.nix
index 1d7c7b22765e..26193b269410 100644
--- a/lib/modules.nix
+++ b/lib/modules.nix
@@ -9,8 +9,19 @@ rec {
/* Evaluate a set of modules. The result is a set of two
attributes: ‘options’: the nested set of all option declarations,
- and ‘config’: the nested set of all option values. */
- evalModules = { modules, prefix ? [], args ? {}, check ? true }:
+ and ‘config’: the nested set of all option values.
+ !!! Please think twice before adding to this argument list! The more
+ that is specified here instead of in the modules themselves the harder
+ it is to transparently move a set of modules to be a submodule of another
+ config (as the proper arguments need to be replicated at each call to
+ evalModules) and the less declarative the module set is. */
+ evalModules = { modules
+ , prefix ? []
+ , # !!! This can be specified modularly now, can we remove it?
+ args ? {}
+ , # !!! This can be specified modularly now, can we remove it?
+ check ? true
+ }:
let
internalModule = rec {
_file = ./modules.nix;
@@ -21,6 +32,7 @@ rec {
__internal.args = mkOption {
description = "Arguments passed to each module.";
+ # !!! Should this be types.uniq types.unspecified?
type = types.attrsOf types.unspecified;
internal = true;