modules: automatically import all modules

This commit is contained in:
Alejandro Soto 2025-08-06 13:56:34 -06:00
parent 8741b32021
commit 5d375d1d93
No known key found for this signature in database
GPG key ID: A2C4C79764EE8F16
2 changed files with 4 additions and 6 deletions

View file

@ -1,6 +1,6 @@
{lib}: { {lib}: {
root, root,
exclude ? [], exclude ? ["default"],
}: }:
with builtins; with builtins;
with lib; with lib;
@ -10,7 +10,7 @@ with lib;
isMatch = name: type: isMatch = name: type:
(hasSuffix ".nix" name || type == "directory") (hasSuffix ".nix" name || type == "directory")
&& ! elem name (map basename exclude); && ! elem (basename name) exclude;
entry = name: _: { entry = name: _: {
name = basename name; name = basename name;

View file

@ -1,5 +1,3 @@
{ {doctrine, ...}: {
imports = [ imports = builtins.attrValues (doctrine.lib.importAll {root = ./.;});
./sway
];
} }