1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-12-17 06:21:10 +01:00

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
No known key found for this signature in database
GPG key ID: 36BDAA14C2797E89
19 changed files with 136 additions and 75 deletions

View file

@ -0,0 +1,11 @@
# Just a convenience function that returns the given Nixpkgs standard
# library extended with the HM library.
nixpkgsLib:
let
mkHmLib = import ./.;
in
nixpkgsLib.extend (self: super: {
hm = mkHmLib { lib = super; };
})