3
0
Fork 0
forked from mirrors/nixpkgs

Merge pull request #5358 from bluescreen303/nixos-extra-modules

nixos: allow adding extra modules through environment
This commit is contained in:
Mathijs Kwik 2014-12-17 09:48:35 +01:00
commit 4aebd5ef87

View file

@ -11,15 +11,16 @@
, prefix ? []
}:
let extraArgs_ = extraArgs; pkgs_ = pkgs; system_ = system; in
rec {
let extraArgs_ = extraArgs; pkgs_ = pkgs; system_ = system;
extraModules = let e = builtins.getEnv "NIXOS_EXTRA_MODULE_PATH";
in if e == "" then [] else [(import (builtins.toPath e))];
in rec {
# Merge the option definitions in all modules, forming the full
# system configuration.
inherit (pkgs.lib.evalModules {
inherit prefix;
modules = modules ++ baseModules;
modules = modules ++ extraModules ++ baseModules;
args = extraArgs;
check = check && options.environment.checkConfigurationOptions.value;
}) config options;