From 5944d01639ce7a677968dbbc495fa9f91e1f8a59 Mon Sep 17 00:00:00 2001 From: Wil Taylor Date: Wed, 26 Jan 2022 15:14:40 +1000 Subject: [PATCH] More fixing overlays --- flake.nix | 34 ++++++++++++++-------------------- lib/default.nix | 2 +- 2 files changed, 15 insertions(+), 21 deletions(-) diff --git a/flake.nix b/flake.nix index 59e9ce1..1d57550 100644 --- a/flake.nix +++ b/flake.nix @@ -74,27 +74,21 @@ "nvim-which-key" ]; - externalBitsOverlay = lib.mkOverlays { - inherit allPkgs; - overlayFunc = sys: pkgs: (top: last: { - rnix-lsp = rnix-lsp.defaultPackage.${sys}; - neovim-nightly = neovim.defaultPackage.${sys}; - }); + externalBitsOverlay = top: last: { + rnix-lsp = rnix-lsp.defaultPackage.${top.system}; + neovim-nightly = neovim.defaultPackage.${top.system}; }; - pluginOverlay = lib.mkOverlays { - inherit allPkgs; - overlayFunc = sys: pkgs: (top: last: let - buildPlug = name: top.vimUtils.buildVimPluginFrom2Nix { - pname = name; - version = "master"; - src = builtins.getAttr name inputs; - }; - in { - neovimPlugins = builtins.listToAttrs (map (name: { inherit name; value = buildPlug name; }) plugins); - }); + pluginOverlay = top: last: let + buildPlug = name: top.vimUtils.buildVimPluginFrom2Nix { + pname = name; + version = "master"; + src = builtins.getAttr name inputs; + }; + in { + neovimPlugins = builtins.listToAttrs (map (name: { inherit name; value = buildPlug name; }) plugins); }; - + allPkgs = lib.mkPkgs { inherit nixpkgs; cfg = { allowUnfree = true; }; @@ -164,8 +158,8 @@ defaultPackage = lib.withDefaultSystems (sys: self.packages."${sys}".neovimWT); overlay = top: last: { - neovimWT = lib.neovimBuilder top; - neovimPlugins = pkgs.neovimPlugins; + neovimWT = lib.neovimBuilder last; + neovimPlugins = last.neovimPlugins; }; packages = lib.withDefaultSystems (sys: { diff --git a/lib/default.nix b/lib/default.nix index 42bb748..0982ad8 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -69,7 +69,7 @@ rec { import nixpkgs { system = sys; config = cfg; - overlays = map (m: m."${sys}") overlays; + overlays = overlays; }); withDefaultSystems = withSystems defaultSystems;