Files
lassulus d492b6d2fc
Nix Flake Check / check (push) Successful in 6m33s
Nix Flake Check / check (pull_request) Successful in 6m34s
lib: add import-flake and clan-community.inputs option
Add lib/import-flake.nix, a generic utility to import remote flakes
via builtins.fetchTree instead of builtins.getFlake. It reuses local
flake inputs where names match, only fetching missing inputs from
the remote flake.lock. Follows references are resolved correctly so
overridden inputs propagate into transitive dependencies.

Add clan-community.inputs.<name> flake-parts options:
  .src             - fetchTree-compatible attrset for the source
  .inputs          - override specific inputs (merged on top of auto-matched)
  .out             - resolved flake outputs (read-only)
2026-04-15 19:10:54 +01:00

23 lines
441 B
Nix

{
lib,
...
}:
{
imports = [
../lib/inputs-module.nix
]
++ (
let
dirContents = builtins.readDir ./.;
validModuleDirs = builtins.filter (
name:
name != "result"
&& dirContents.${name} == "directory"
&& builtins.pathExists (./. + "/${name}/flake-module.nix")
) (builtins.attrNames dirContents);
in
map (name: ./. + "/${name}/flake-module.nix") validModuleDirs
);
}