Switch to extended Nixpkg's lib

This change makes use of the `extend` function inside `lib` to inject
a new `hm` field containing the Home Manager library functions. This
simplifies use of the Home Manager library in the modules and reduces
the risk of accidental infinite recursion.

PR #994
This commit is contained in:
Robert Helgesson
2020-01-16 23:41:14 +01:00
parent c8323a0bf1
commit 6e4b9af080
19 changed files with 136 additions and 75 deletions

View File

@@ -19,10 +19,16 @@ let
in
fold f res res.config.warnings;
rawModule = lib.evalModules {
modules =
[ configuration ]
++ (import ./modules.nix { inherit check lib pkgs; });
extendedLib = import ./lib/stdlib-extended.nix pkgs.lib;
hmModules =
import ./modules.nix {
inherit check pkgs;
lib = extendedLib;
};
rawModule = extendedLib.evalModules {
modules = [ configuration ] ++ hmModules;
specialArgs = {
modulesPath = builtins.toString ./.;
};