mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-03-24 10:21:43 +01:00
36 lines
706 B
Nix
36 lines
706 B
Nix
{
|
|
lib,
|
|
inputs,
|
|
...
|
|
}@args:
|
|
let
|
|
inherit (inputs) haumea;
|
|
|
|
# Contains all the flake outputs of this system architecture.
|
|
data = haumea.lib.load {
|
|
src = ./src;
|
|
inputs = args;
|
|
};
|
|
# nix file names is redundant, so we remove it.
|
|
dataWithoutPaths = builtins.attrValues data;
|
|
|
|
# Merge all the machine's data into a single attribute set.
|
|
outputs = {
|
|
darwinConfigurations = lib.attrsets.mergeAttrsList (
|
|
map (it: it.darwinConfigurations or { }) dataWithoutPaths
|
|
);
|
|
};
|
|
in
|
|
outputs
|
|
// {
|
|
inherit data; # for debugging purposes
|
|
|
|
# NixOS's unit tests.
|
|
evalTests = haumea.lib.loadEvalTests {
|
|
src = ./tests;
|
|
inputs = args // {
|
|
inherit outputs;
|
|
};
|
|
};
|
|
}
|