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 {
|
rec {
|
||||||
|
configComponents = [
|
||||||
|
configuration
|
||||||
|
optionDeclarations
|
||||||
|
];
|
||||||
|
|
||||||
|
noOption = name: values:
|
||||||
|
abort "${name}: Used without option declaration.";
|
||||||
|
|
||||||
# Make a configuration object from which we can retrieve option
|
# Make a configuration object from which we can retrieve option
|
||||||
# values.
|
# values.
|
||||||
config = pkgs.lib.addDefaultOptionValues optionDeclarations configuration;
|
config =
|
||||||
|
pkgs.lib.finalReferenceOptionSets
|
||||||
|
(pkgs.lib.mergeOptionSets noOption)
|
||||||
|
pkgs configComponents;
|
||||||
|
|
||||||
optionDeclarations = import ./options.nix {inherit pkgs; inherit (pkgs.lib) mkOption;};
|
optionDeclarations =
|
||||||
|
import ./options.nix {inherit pkgs; inherit (pkgs.lib) mkOption;};
|
||||||
|
|
||||||
pkgs = import "${nixpkgsPath}/pkgs/top-level/all-packages.nix" {system = platform;};
|
pkgs = import "${nixpkgsPath}/pkgs/top-level/all-packages.nix" {system = platform;};
|
||||||
|
|
||||||
@ -438,8 +448,6 @@ rec {
|
|||||||
configuration = x//{boot=((x.boot)//{grubDevice = "";});};}).system)
|
configuration = x//{boot=((x.boot)//{grubDevice = "";});};}).system)
|
||||||
config.nesting.children;
|
config.nesting.children;
|
||||||
configurationName = config.boot.configurationName;
|
configurationName = config.boot.configurationName;
|
||||||
}) (pkgs.lib.getAttr ["environment" "checkConfigurationOptions"]
|
}) config.environment.checkConfigurationOptions
|
||||||
optionDeclarations.environment.checkConfigurationOptions.default
|
optionDeclarations config;
|
||||||
configuration)
|
|
||||||
optionDeclarations configuration;
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user