# {lib}: # lib.makeExtensible (self: # let # callLibs = file: import file { lib = self; }; # in # rec { # ## Define your own library functions here! # #id = x: x; # ## Or in files, containing functions that take {lib} # map = callLibs ./map.nix; # ## In configs, they can be used under "lib.our" # }) { 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))