-
Notifications
You must be signed in to change notification settings - Fork 27
/
Copy pathcollect.nix
45 lines (43 loc) · 1.33 KB
/
collect.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
37
38
39
40
41
42
43
44
45
{
inputs,
nixpkgs,
root,
}: let
collectors =
root.collectors
// {
/*
Modules declare an interface into a problem domain
*/
darwinModules = throw "not implemented yet";
nixosModules = throw "not implemented yet";
homeModules = throw "not implemented yet";
shellModules = throw "not implemented yet";
/*
Profiles define values on that interface
*/
hardwareProfiles = throw "not implemented yet";
darwinProfiles = throw "not implemented yet";
nixosProfiles = throw "not implemented yet";
homeProfiles = throw "not implemented yet";
shellProfiles = throw "not implemented yet";
/*
Suites aggregate profiles into groups
*/
darwinSuites = throw "not implemented yet";
nixosSuites = throw "not implemented yet";
homeSuites = throw "not implemented yet";
shellSuites = throw "not implemented yet";
};
in {
renamer = cell: target: "${cell}-${target}";
__functor = self: Self: CellBlock:
if builtins.hasAttr CellBlock collectors
then collectors.${CellBlock} self.renamer Self
else
builtins.throw ''
`hive.collect` can't collect ${CellBlock}.
It can collect the following cell blocks:
- ${builtins.concatStringsSep "\n - " (builtins.attrNames collectors)}
'';
}