feat: format via 'ls **/*.nix | each { |it| nixfmt $it.name }'

This commit is contained in:
Ryan Yin
2025-07-30 12:17:24 +08:00
parent d10b30b06b
commit 13bb77108c
219 changed files with 2103 additions and 1728 deletions

View File

@@ -2,7 +2,8 @@
lib,
inputs,
...
} @ args: let
}@args:
let
inherit (inputs) haumea;
# Contains all the flake outputs of this system architecture.
@@ -15,23 +16,31 @@
# Merge all the machine's data into a single attribute set.
outputs = {
nixosConfigurations = lib.attrsets.mergeAttrsList (map (it: it.nixosConfigurations or {}) dataWithoutPaths);
packages = lib.attrsets.mergeAttrsList (map (it: it.packages or {}) dataWithoutPaths);
nixosConfigurations = lib.attrsets.mergeAttrsList (
map (it: it.nixosConfigurations or { }) dataWithoutPaths
);
packages = lib.attrsets.mergeAttrsList (map (it: it.packages or { }) dataWithoutPaths);
# colmena contains some meta info, which need to be merged carefully.
colmenaMeta = {
nodeNixpkgs = lib.attrsets.mergeAttrsList (map (it: it.colmenaMeta.nodeNixpkgs or {}) dataWithoutPaths);
nodeSpecialArgs = lib.attrsets.mergeAttrsList (map (it: it.colmenaMeta.nodeSpecialArgs or {}) dataWithoutPaths);
nodeNixpkgs = lib.attrsets.mergeAttrsList (
map (it: it.colmenaMeta.nodeNixpkgs or { }) dataWithoutPaths
);
nodeSpecialArgs = lib.attrsets.mergeAttrsList (
map (it: it.colmenaMeta.nodeSpecialArgs or { }) dataWithoutPaths
);
};
colmena = lib.attrsets.mergeAttrsList (map (it: it.colmena or {}) dataWithoutPaths);
colmena = lib.attrsets.mergeAttrsList (map (it: it.colmena or { }) dataWithoutPaths);
};
in
outputs
// {
inherit data; # for debugging purposes
outputs
// {
inherit data; # for debugging purposes
# NixOS's unit tests.
evalTests = haumea.lib.loadEvalTests {
src = ./tests;
inputs = args // {inherit outputs;};
# NixOS's unit tests.
evalTests = haumea.lib.loadEvalTests {
src = ./tests;
inputs = args // {
inherit outputs;
};
}
};
}