-
Notifications
You must be signed in to change notification settings - Fork 2
/
default.nix
36 lines (27 loc) · 1.08 KB
/
default.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
inputs:
with builtins;
with inputs.nixpkgs.lib;
let
api = makeExtensible (self: {
lib = import ./lib/default.nix { inherit (inputs.nixpkgs) lib; };
hixModules = import ./modules/all-modules.nix { inherit inputs; };
flakeWith = {projectModules ? [], extraModules ? []}:
import ./lib/eval.nix {
inherit (inputs.nixpkgs) lib;
inherit (self) hixModules;
inherit projectModules extraModules;
};
flake = projectModules: self.flakeWith { projectModules = toList projectModules; };
pro = projectModules:
self.flakeWith { extraModules = [(import ./modules/pro.nix)]; projectModules = toList projectModules; };
_hix_test = projectModules:
self.flakeWith { extraModules = [(import ./modules/hix-test.nix)]; projectModules = toList projectModules; };
spec = import ./lib/deps/spec.nix { inherit (self) lib; };
});
testConfig = import ./ops/test-config.nix;
localModule = import ./local.nix { inherit inputs; };
localOutputs = api.pro [localModule testConfig];
in localOutputs // {
lib = api;
__functor = self: self.lib.flake;
}