flake.lib: allow generic module styles

This commit is contained in:
2025-12-28 18:00:25 +08:00
parent 8fba11e9a8
commit 8587524732

View File

@@ -14,7 +14,8 @@ lib: rec
(
let handle = module: let type = builtins.typeOf module; in
if type == "path" || type == "string" then (handle (import module))
else if type == "lambda" then ({ pkgs, utils, ... }@inputs: (module inputs))
else if type == "lambda" && builtins.functionArgs module == {}
then ({ pkgs, utils, ... }@inputs: (module inputs))
else module;
in handle
)