rework lib and some general changes
This commit is contained in:
parent
48b7ab9fab
commit
af804c63f8
11 changed files with 152 additions and 121 deletions
|
@ -1,17 +1,20 @@
|
|||
{ inputs, lib, pkgs, ... }:
|
||||
|
||||
lib.extend (self: super:
|
||||
let
|
||||
inherit (lib) attrValues foldr;
|
||||
inherit (lib.attrsets) attrValues;
|
||||
inherit (lib.fixedPoints) makeExtensible;
|
||||
inherit (lib.lists) foldr;
|
||||
inherit (modules) mapModules;
|
||||
inherit (helpers) getSSH;
|
||||
|
||||
modules = import ./modules.nix { inherit lib; };
|
||||
helpers = import ./helpers.nix { inherit lib; };
|
||||
in {
|
||||
_ = foldr (a: b: a // b) {} (attrValues (mapModules ./. (file: import file {
|
||||
inherit pkgs inputs;
|
||||
lib = self;
|
||||
})));
|
||||
}
|
||||
)
|
||||
modules = import ./modules.nix {
|
||||
inherit lib;
|
||||
self.attrs = import ./attrs.nix {
|
||||
inherit lib;
|
||||
self = {};
|
||||
};
|
||||
};
|
||||
mylib =
|
||||
makeExtensible (self:
|
||||
mapModules ./. (file: import file {inherit self lib pkgs inputs;}));
|
||||
in
|
||||
mylib.extend (self: super: foldr (a: b: a // b) {} (attrValues super))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue