From 284f0e7d26bdada9a053c19dfd27fe407ec01a53 Mon Sep 17 00:00:00 2001 From: Nicolas Pierron Date: Mon, 6 Jul 2009 23:25:12 +0000 Subject: [PATCH] Use "definitionsOf" & "fixableDeclarationsOf": Hide implementation details. svn path=/nixos/branches/modular-nixos/; revision=16199 --- lib/eval-config.nix | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/lib/eval-config.nix b/lib/eval-config.nix index 84c60bd69215..d5947e8d8702 100644 --- a/lib/eval-config.nix +++ b/lib/eval-config.nix @@ -17,16 +17,17 @@ rec { ] ++ (import ../modules/module-list.nix); config_ = - pkgs.lib.fixOptionSets - pkgs.lib.mergeOptionSets - { inherit pkgs; } configComponents; + pkgs.lib.definitionsOf configComponents { + inherit pkgs; + }; + # "fixableDeclarationsOf" is used instead of "declarationsOf" because some + # option default values may depends on the definition of other options. optionDeclarations = - pkgs.lib.fixOptionSetsFun - pkgs.lib.filterOptionSets - { inherit pkgs; } configComponents - config_; - + pkgs.lib.fixableDeclarationsOf configComponents { + inherit pkgs; + } config_; + # Optionally check wether all config values have corresponding # option declarations. config = pkgs.checker config_