From 480ca0c41ee22e8315bee360801651a81bc2be16 Mon Sep 17 00:00:00 2001 From: Daylin Morgan Date: Wed, 14 Aug 2024 09:50:26 -0500 Subject: [PATCH] use pipes because why not --- overlays/default.nix | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/overlays/default.nix b/overlays/default.nix index f3ee3a4..9934315 100644 --- a/overlays/default.nix +++ b/overlays/default.nix @@ -1,16 +1,28 @@ { inputs, ... }: let - defaultOverlays = - # execute and import all overlay files in the current - # directory with the given args - builtins.map - # execute and import the overlay file - (f: (import (./. + "/${f}") { inherit inputs; })) - # find all overlay files in the current directory - (builtins.filter (f: f != "default.nix") (builtins.attrNames (builtins.readDir ./.))); + inherit (builtins) + map + filter + attrNames + readDir + ; + # execute and import all overlay files in the current + # directory with the given args + # overlays = + # map + # (f: (import (./. + "/${f}") { inherit inputs; })) + # (filter (f: f != "default.nix") (attrNames (readDir ./.))); + overlays = + readDir ./. + |> attrNames + |> filter (f: f != "default.nix") + |> map (f: import (./. + "/${f}") { inherit inputs; }); + # map + # (f: (import (./. + "/${f}") { inherit inputs; })) + # (filter (f: f != "default.nix") (attrNames (readDir ./.))); in { - nixpkgs.overlays = defaultOverlays ++ [ + nixpkgs.overlays = overlays ++ [ (final: _prev: { stable = import inputs.stable { system = final.system;