From 394d8fcec67bafeab3c7ed1437ffdc1f476fffaf Mon Sep 17 00:00:00 2001 From: Malte Brandy Date: Sat, 27 Jun 2020 17:02:29 +0200 Subject: [PATCH] Fix overlays --- overlays/default.nix | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 overlays/default.nix diff --git a/overlays/default.nix b/overlays/default.nix new file mode 100644 index 00000000..016a881a --- /dev/null +++ b/overlays/default.nix @@ -0,0 +1,12 @@ +{ lib }: +let + overlayPath = ./.; + candidates = lib.attrNames (builtins.readDir overlayPath); + pathToOverlay = n: overlayPath + ("/" + n); + isNixFile = n: builtins.match ".*\\.nix" n != null; + isNixDir = n: builtins.pathExists (pathToOverlay n + "/default.nix"); + notDefault = n: n != "default.nix"; + isOverlay = n: (isNixDir n || isNixFile n) && notDefault n; + overlays = builtins.filter isOverlay candidates; + importOverlay = n: import (pathToOverlay n); +in map importOverlay overlays