nix-server/lib/default.nix
2024-12-08 18:39:26 -08:00

20 lines
535 B
Nix
Executable file

{ 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 =
makeExtensible (self:
mapModules ./. (file: import file {inherit self lib pkgs inputs;}));
in
mylib.extend (self: super: foldr (a: b: a // b) {} (attrValues super))