about summary refs log tree commit diff
path: root/lib/default.nix
blob: d437dc6b3c10cab2a2f05562ea663f56ece50dc7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
{ inputs, lib, ...}:

let
  inherit (lib) makeExtensible attrValues foldr;
  inherit (modules) mapModules;

  modules = import ./modules.nix {
    inherit lib;
    self.lib.attrs = import ./attrs.nix { inherit lib; self = { }; };
  };

  mylib = makeExtensible (self:
    mapModules ./.
    (file: import file ({ inherit lib; } // inputs)));
in
mylib.extend
  (self: super:
  foldr (a: b: a//b) { } (attrValues super))