diff options
Diffstat (limited to 'nixos/lib/eval-config.nix')
-rw-r--r-- | nixos/lib/eval-config.nix | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/nixos/lib/eval-config.nix b/nixos/lib/eval-config.nix index 0fa00637a93a..08adcf3a0078 100644 --- a/nixos/lib/eval-config.nix +++ b/nixos/lib/eval-config.nix @@ -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; |