From 33639143ea50404a04bc4c454435aff1bd79dd4b Mon Sep 17 00:00:00 2001 From: Benedikt Peetz Date: Fri, 20 Dec 2024 13:58:21 +0100 Subject: refactor({modules,test}): Migrate to a `by-name` structure --- modules/default.nix | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 modules/default.nix (limited to 'modules/default.nix') diff --git a/modules/default.nix b/modules/default.nix new file mode 100644 index 0000000..61d259d --- /dev/null +++ b/modules/default.nix @@ -0,0 +1,21 @@ +{nixLib, ...}: let + files = + builtins.attrValues + (nixLib.mkByName { + baseDirectory = ./by-name; + fileName = "module.nix"; + + # We only want the base paths. + finalizeFunction = name: value: value; + + # TODO: Re-activate, when/if most modules have tests. <2024-11-23> + # coImportsNameFunction = { + # shard, + # name, + # }: + # ../tests/by-name + "/${shard}" + "/${name}" + "/test.nix"; + # coImportsWarnMessageObject = "test"; + }); +in { + imports = files; +} -- cgit 1.4.1