flake: add symlink for needed packages in overlay

This commit is contained in:
Asmir A 2024-03-16 14:05:41 +01:00
parent dce3a89665
commit 5bba266c6e
Signed by: asmir
GPG Key ID: 020C42B7A9ABA3E2

View File

@ -12,7 +12,6 @@
supportedSystems = ["x86_64-linux" "aarch64-linux"]; supportedSystems = ["x86_64-linux" "aarch64-linux"];
forAllSystems = nixpkgs.lib.genAttrs supportedSystems; forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
nixpkgsFor = forAllSystems (system: import nixpkgs {inherit system;}); nixpkgsFor = forAllSystems (system: import nixpkgs {inherit system;});
pkgs = nixpkgs.legacyPackages.x86_64-linux.pkgs;
in { in {
packages = forAllSystems (system: let packages = forAllSystems (system: let
pkgs = nixpkgsFor.${system}; 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); defaultPackage = forAllSystems (system: self.packages.${system}.nvim);
}; };
} }