From b7ebed04d361fd2d147820c3c558ea3f7e6b7dca Mon Sep 17 00:00:00 2001 From: teutat3s Date: Mon, 4 Dec 2023 12:34:44 +0100 Subject: [PATCH] feat: add flake-friendly nix-index overlay See: https://github.com/nix-community/nix-index/pull/227 --- overlays/default.nix | 39 ++++++++++++++++++++++++++++++++++----- 1 file changed, 34 insertions(+), 5 deletions(-) diff --git a/overlays/default.nix b/overlays/default.nix index 6d06ca97..799b1ed1 100644 --- a/overlays/default.nix +++ b/overlays/default.nix @@ -1,5 +1,34 @@ -[ - (import ../pkgs) - (import ./manix.nix) - (import ./neovim-plugins.nix) -] +{ + self, + lib, + inputs, + ... +}: { + flake = { + nixosModules = rec { + overlays = ({ ... }: { + nixpkgs.overlays = [ + + (final: prev: + let + unstable = import inputs.unstable { + system = prev.system; + #config.allowUnfreePredicate = pkg: builtins.elem (prev.lib.getName pkg) [ + # "1password-cli" + # "1password" + # "slack" + #]; + }; + in + { + #slack = unstable.slack; + #vimPlugins = prev.vimPlugins // {inherit (unstable.vimPlugins) nvim-lspconfig;}; + }) + (import ../pkgs) + (import ./neovim-plugins.nix) + (import ./nix-index.nix) + ]; + }); + }; + }; +}