From fc6b221ba135a7f99adbcde435170ff05008346c Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Thu, 20 Jul 2023 21:47:10 +0100 Subject: [PATCH] overlays: make overlay import automatic Don't rely on nixpkgs' lib to make it easier to just `import` the directory. --- overlays/default.nix | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/overlays/default.nix b/overlays/default.nix index e504b17..683e021 100644 --- a/overlays/default.nix +++ b/overlays/default.nix @@ -1,3 +1,6 @@ -{ - # No overlays -} +# Automatically import all overlays in the directory +let + files = builtins.readDir ./.; + overlays = builtins.removeAttrs files [ "default.nix" ]; +in +builtins.mapAttrs (name: _: import "${./.}/${name}") overlays