Ah :) I did read the sources of lib/eval-config and saw that configuration.nix is just treated as a module, so I did understand that part. However it wasn't clear to me how to use that to add additional modules (config option "modules" of course doesn't exist).
But indeed, now it's clear. Didn't see lib/modules in nixpkgs yet. Quite ingenious :) I'll revert my commit. On Sat, Jul 21, 2012 at 6:11 PM, Shea Levy <[email protected]> wrote: > Nope, it works for both. 'configuration files' are actually a special case of > a module (a module that has no options and unconditionally sets other > options). > > On Jul 21, 2012, at 12:05 PM, Mathijs Kwik <[email protected]> wrote: > >> As I understood, "require" is for including configuration files (that >> set options). >> >> This new option allows adding modules, leading to new options to configure. >> >> >> >> On Sat, Jul 21, 2012 at 6:00 PM, Shea Levy <[email protected]> wrote: >>> How does the 'require' option not suit this need? >>> >>> On Jul 21, 2012, at 11:38 AM, Mathijs Kwik <[email protected]> wrote: >>> >>>> Branch: refs/heads/master >>>> Home: https://github.com/NixOS/nixos >>>> Commit: b609ff4fcf48b2124d94bf1052c303a36c8cabf1 >>>> >>>> https://github.com/NixOS/nixos/commit/b609ff4fcf48b2124d94bf1052c303a36c8cabf1 >>>> Author: Mathijs Kwik <[email protected]> >>>> Date: 2012-07-21 (Sat, 21 Jul 2012) >>>> >>>> Changed paths: >>>> M default.nix >>>> M modules/security/sudo.nix >>>> >>>> Log Message: >>>> ----------- >>>> allow out-of-tree nixos modules >>>> >>>> The environment variable "NIXOS_EXTRA_MODULES" is now checked to >>>> contain a path to a file similar to modules/module-list.nix. >>>> >>>> This gives the ability to include nixos modules that are not in the >>>> nixos source tree. >>>> >>>> This can be useful for modules that are still experimental, or which >>>> aren't useful for other nixos users. Of course, this was already >>>> possible to do this using a forked nixos tree, but with this >>>> functionality, you can just rely on the nixos channel, easing things a >>>> lot. >>>> >>>> >>>> >>>> _______________________________________________ >>>> nix-commits mailing list >>>> [email protected] >>>> http://lists.science.uu.nl/mailman/listinfo/nix-commits _______________________________________________ nix-dev mailing list [email protected] http://lists.science.uu.nl/mailman/listinfo/nix-dev
