From d6b091c26de53297335786ee12e49b89b3a0da7f Mon Sep 17 00:00:00 2001 From: oddlama Date: Sat, 4 Feb 2023 02:37:53 +0100 Subject: [PATCH] chore: minor cleanup of overlay.nix --- nix/overlay.nix | 18 +++++++----------- nix/overlays/scripts/default.nix | 3 +-- 2 files changed, 8 insertions(+), 13 deletions(-) diff --git a/nix/overlay.nix b/nix/overlay.nix index 27d12a8..1044f44 100644 --- a/nix/overlay.nix +++ b/nix/overlay.nix @@ -2,20 +2,16 @@ nixpkgs, ragenix, ... -}: let - inherit (nixpkgs) lib; +}: +with nixpkgs.lib; let localOverlays = - lib.mapAttrs' - (f: _: - lib.nameValuePair - (lib.removeSuffix ".nix" f) - (import (./overlays + "/${f}"))) + mapAttrs' + (f: _: nameValuePair (removeSuffix ".nix" f) (import (./overlays + "/${f}"))) (builtins.readDir ./overlays); in localOverlays // { - default = lib.composeManyExtensions ((lib.attrValues localOverlays) - ++ [ - ragenix.overlays.default - ]); + default = + composeManyExtensions ((attrValues localOverlays) + ++ [ragenix.overlays.default]); } diff --git a/nix/overlays/scripts/default.nix b/nix/overlays/scripts/default.nix index d9a817f..e215bf0 100644 --- a/nix/overlays/scripts/default.nix +++ b/nix/overlays/scripts/default.nix @@ -1,8 +1,7 @@ final: prev: with prev.lib; with builtins; - composeManyExtensions - ( + composeManyExtensions ( map (f: import (./. + "/${f}")) (remove "default.nix" (attrNames (readDir ./.)))