Use the new scheme of configuration evaluation.
svn path=/nixos/trunk/; revision=12519
This commit is contained in:
parent
f5e61dfa0c
commit
92560a1dc0
@ -5,13 +5,23 @@
|
||||
}:
|
||||
|
||||
rec {
|
||||
configComponents = [
|
||||
configuration
|
||||
optionDeclarations
|
||||
];
|
||||
|
||||
noOption = name: values:
|
||||
abort "${name}: Used without option declaration.";
|
||||
|
||||
# Make a configuration object from which we can retrieve option
|
||||
# values.
|
||||
config = pkgs.lib.addDefaultOptionValues optionDeclarations configuration;
|
||||
|
||||
optionDeclarations = import ./options.nix {inherit pkgs; inherit (pkgs.lib) mkOption;};
|
||||
config =
|
||||
pkgs.lib.finalReferenceOptionSets
|
||||
(pkgs.lib.mergeOptionSets noOption)
|
||||
pkgs configComponents;
|
||||
|
||||
optionDeclarations =
|
||||
import ./options.nix {inherit pkgs; inherit (pkgs.lib) mkOption;};
|
||||
|
||||
pkgs = import "${nixpkgsPath}/pkgs/top-level/all-packages.nix" {system = platform;};
|
||||
|
||||
@ -438,8 +448,6 @@ rec {
|
||||
configuration = x//{boot=((x.boot)//{grubDevice = "";});};}).system)
|
||||
config.nesting.children;
|
||||
configurationName = config.boot.configurationName;
|
||||
}) (pkgs.lib.getAttr ["environment" "checkConfigurationOptions"]
|
||||
optionDeclarations.environment.checkConfigurationOptions.default
|
||||
configuration)
|
||||
optionDeclarations configuration;
|
||||
}) config.environment.checkConfigurationOptions
|
||||
optionDeclarations config;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user