summary refs log tree commit diff stats
path: root/modules/default.nix
diff options
context:
space:
mode:
authorBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-12-20 13:58:21 +0100
committerBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-12-20 13:58:21 +0100
commit33639143ea50404a04bc4c454435aff1bd79dd4b (patch)
treeede4b6832bb86ac30281fc22700ae1fe40658f37 /modules/default.nix
parentfix(treewide): Update to nixos release 24.11 (diff)
downloadnixos-server-33639143ea50404a04bc4c454435aff1bd79dd4b.tar.gz
nixos-server-33639143ea50404a04bc4c454435aff1bd79dd4b.zip
refactor({modules,test}): Migrate to a `by-name` structure
Diffstat (limited to 'modules/default.nix')
-rw-r--r--modules/default.nix21
1 files changed, 21 insertions, 0 deletions
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;
+}