Working on modularizing stuff
This commit is contained in:
parent
835faf218d
commit
8349809fec
15 changed files with 256 additions and 41 deletions
22
lib/default.nix
Normal file
22
lib/default.nix
Normal file
|
@ -0,0 +1,22 @@
|
|||
{ inputs, lib, pkgs, ... }:
|
||||
let
|
||||
inherit (lib.attrsets) attrValues;
|
||||
inherit (lib.fixedPoints) makeExtensible;
|
||||
inherit (lib.lists) foldr;
|
||||
inherit (modules) mapModules;
|
||||
|
||||
modules = import ./modules.nix {
|
||||
inherit lib;
|
||||
|
||||
self.attrs = import ./attrs.nix {
|
||||
inherit lib;
|
||||
|
||||
self = {};
|
||||
};
|
||||
};
|
||||
|
||||
mylib = makeExensible (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