From b56d08fc838fb1ebace5b7f12dc5a7b999e2fe60 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 14 Jul 2009 12:36:02 +0000 Subject: [PATCH] * Move the hardware modules back to the main modules tree. No need for a separate tree. * Pass the path of the modules tree to modules so that you don't have to write absolute paths, e.g. you can say require = [ "${modulesPath}/hardware/network/intel-3945abg.nix" ]; instead of require = [ /etc/nixos/nixos/hardware/network/intel-3945abg.nix ]; The latter is bad because it makes it hard to build from a different NixOS source tree. svn path=/nixos/branches/modular-nixos/; revision=16350 --- lib/eval-config.nix | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/lib/eval-config.nix b/lib/eval-config.nix index d5947e8d870..4a1853a8d32 100644 --- a/lib/eval-config.nix +++ b/lib/eval-config.nix @@ -16,17 +16,18 @@ rec { ./check-config.nix ] ++ (import ../modules/module-list.nix); + extraArgs = { + inherit pkgs; + modulesPath = ../modules; + }; + config_ = - pkgs.lib.definitionsOf configComponents { - inherit pkgs; - }; + pkgs.lib.definitionsOf configComponents extraArgs; # "fixableDeclarationsOf" is used instead of "declarationsOf" because some # option default values may depends on the definition of other options. optionDeclarations = - pkgs.lib.fixableDeclarationsOf configComponents { - inherit pkgs; - } config_; + pkgs.lib.fixableDeclarationsOf configComponents extraArgs config_; # Optionally check wether all config values have corresponding # option declarations.