Skip to content

Commit

Permalink
lib/modules.nix: Deduplicate documentation
Browse files Browse the repository at this point in the history
`file://./..` looks redundant, but makes the url clickable in vscode.
  • Loading branch information
roberth committed May 6, 2023
1 parent 03a465f commit 73f584c
Showing 1 changed file with 2 additions and 29 deletions.
31 changes: 2 additions & 29 deletions lib/modules.nix
Original file line number Diff line number Diff line change
Expand Up @@ -63,35 +63,8 @@ let
decls
));

/*
Evaluate a set of modules. The result is a set with the attributes:
‘options’: The nested set of all option declarations,
‘config’: The nested set of all option values.
‘type’: A module system type representing the module set as a submodule,
to be extended by configuration from the containing module set.
This is also available as the module argument ‘moduleType’.
‘extendModules’: A function similar to ‘evalModules’ but building on top
of the module set. Its arguments, ‘modules’ and ‘specialArgs’ are
added to the existing values.
Using ‘extendModules’ a few times has no performance impact as long
as you only reference the final ‘options’ and ‘config’.
If you do reference multiple ‘config’ (or ‘options’) from before and
after ‘extendModules’, performance is the same as with multiple
‘evalModules’ invocations, because the new modules' ability to
override existing configuration fundamentally requires a new
fixpoint to be constructed.
This is also available as a module argument.
‘_module’: A portion of the configuration tree which is elided from
‘config’. It contains some values that are mostly internal to the
module system implementation.
/* See https://nixos.org/manual/nixpkgs/unstable/#module-system-lib-evalModules
or file://./../doc/module-system/module-system.chapter.md
!!! Please think twice before adding to this argument list! The more
that is specified here instead of in the modules themselves the harder
Expand Down

0 comments on commit 73f584c

Please sign in to comment.