Merge pull request #5358 from bluescreen303/nixos-extra-modules
nixos: allow adding extra modules through environment
This commit is contained in:
commit
4aebd5ef87
@ -11,15 +11,16 @@
|
|||||||
, prefix ? []
|
, prefix ? []
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let extraArgs_ = extraArgs; pkgs_ = pkgs; system_ = system; in
|
let extraArgs_ = extraArgs; pkgs_ = pkgs; system_ = system;
|
||||||
|
extraModules = let e = builtins.getEnv "NIXOS_EXTRA_MODULE_PATH";
|
||||||
rec {
|
in if e == "" then [] else [(import (builtins.toPath e))];
|
||||||
|
in rec {
|
||||||
|
|
||||||
# Merge the option definitions in all modules, forming the full
|
# Merge the option definitions in all modules, forming the full
|
||||||
# system configuration.
|
# system configuration.
|
||||||
inherit (pkgs.lib.evalModules {
|
inherit (pkgs.lib.evalModules {
|
||||||
inherit prefix;
|
inherit prefix;
|
||||||
modules = modules ++ baseModules;
|
modules = modules ++ extraModules ++ baseModules;
|
||||||
args = extraArgs;
|
args = extraArgs;
|
||||||
check = check && options.environment.checkConfigurationOptions.value;
|
check = check && options.environment.checkConfigurationOptions.value;
|
||||||
}) config options;
|
}) config options;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user