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

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

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

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