From 5bba266c6ef1cb4c59d10fea616db0cde362744f Mon Sep 17 00:00:00 2001 From: Asmir A Date: Sat, 16 Mar 2024 14:05:41 +0100 Subject: [PATCH] flake: add symlink for needed packages in overlay --- flake.nix | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index 2a6952c..8e3fa94 100644 --- a/flake.nix +++ b/flake.nix @@ -12,7 +12,6 @@ supportedSystems = ["x86_64-linux" "aarch64-linux"]; forAllSystems = nixpkgs.lib.genAttrs supportedSystems; nixpkgsFor = forAllSystems (system: import nixpkgs {inherit system;}); - pkgs = nixpkgs.legacyPackages.x86_64-linux.pkgs; in { packages = forAllSystems (system: let pkgs = nixpkgsFor.${system}; @@ -43,6 +42,32 @@ }; }); + overlays = forAllSystems (system: let + pkgs = nixpkgsFor.${system}; + in { + overlay = final: prev: { + nvim = pkgs.symlinkJoin { + name = "nvim"; + paths = with pkgs; + [ + alejandra + ccls + gopls + luaformatter + nixd + pyright + rust-analyzer + sumneko-lua-language-server + svls + texlab + tree-sitter + verible + zls + ] + ++ [self.packages.${system}.nvim]; + }; + }; + }); defaultPackage = forAllSystems (system: self.packages.${system}.nvim); }; }