about 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-10-24 14:59:29 +0200
committerBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-10-24 14:59:29 +0200
commit0cc353f49f9c5d0e0bd203a6854b488a58daaa96 (patch)
tree48d4a821a842f94e3614f7c310423d9d2c98cc21 /modules/default.nix
parentrefactor(modules/unison): Migrate to `by-name` and parameterize (diff)
downloadnixos-config-0cc353f49f9c5d0e0bd203a6854b488a58daaa96.tar.gz
nixos-config-0cc353f49f9c5d0e0bd203a6854b488a58daaa96.zip
refactor({modules,pkgs}/by-name-overlay): De-duplicate in a `nixLib`
Diffstat (limited to 'modules/default.nix')
-rw-r--r--modules/default.nix13
1 files changed, 9 insertions, 4 deletions
diff --git a/modules/default.nix b/modules/default.nix
index a3bc1735..3364c3db 100644
--- a/modules/default.nix
+++ b/modules/default.nix
@@ -1,10 +1,15 @@
 # NOTE: This file **must** not depend on `pkgs`. This is because `pkgs` is defined in a
 # module imported by it, and thus would require infinite recursion.  <2024-10-18>
 {...}: let
-  files = import ./by-name-overlay.nix {
-    baseDirectory =
-      ./by-name;
-  };
+  nixLib = import ../lib {};
+
+  files =
+    builtins.attrValues
+    (nixLib.mkByName {
+      baseDirectory = ./by-name;
+      fileName = "module.nix";
+      finalizeFunction = name: value: value;
+    });
 in {
   imports = files;
 }