summaryrefslogtreecommitdiffstats
path: root/lib/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'lib/default.nix')
-rw-r--r--lib/default.nix15
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/default.nix b/lib/default.nix
index 94a81439e..7c3b0370e 100644
--- a/lib/default.nix
+++ b/lib/default.nix
@@ -2,8 +2,23 @@ let
nixpkgs-lib = import <nixpkgs/lib>;
lib = with lib; nixpkgs-lib // builtins // {
+ evalModulesConfig = modules: let
+ eval = evalModules {
+ inherit modules;
+ };
+ in filterAttrsRecursive (name: _: !hasPrefix "_" name) eval.config;
+
evalSource = import ./eval-source.nix;
+ evalSubmodule = submodule: modules: let
+ prefix = ["evalSubmodule"];
+ in evalModulesConfig [
+ {
+ options = removeAttrs (submodule.getSubOptions prefix) ["_module"];
+ imports = modules;
+ }
+ ];
+
git = import ./git.nix { inherit lib; };
haskell = import ./haskell.nix { inherit lib; };
krebs = import ./krebs lib;