Move programs to modules
This commit is contained in:
19
lib/default.nix
Normal file
19
lib/default.nix
Normal file
@ -0,0 +1,19 @@
|
||||
|
||||
{ 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))
|
Reference in New Issue
Block a user