flake: add overlay

This commit is contained in:
Asmir A 2024-01-27 19:10:17 +01:00
parent dce3a89665
commit 237d5e6a66
Signed by: asmir
GPG Key ID: 020C42B7A9ABA3E2

View File

@ -12,7 +12,21 @@
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;
additionalDeps = pkgs: [
pkgs.alejandra
pkgs.ccls
pkgs.gopls
pkgs.luaformatter
pkgs.nixd
pkgs.pyright
pkgs.rust-analyzer
pkgs.sumneko-lua-language-server
pkgs.svls
pkgs.texlab
pkgs.tree-sitter
pkgs.verible
pkgs.zls
];
in {
packages = forAllSystems (system: let
pkgs = nixpkgsFor.${system};
@ -22,6 +36,7 @@
devShells = forAllSystems (system: let
pkgs = nixpkgsFor.${system};
vim = self.packages.${system};
in {
default = pkgs.mkShell {
nativeBuildInputs = [
@ -38,11 +53,23 @@
pkgs.tree-sitter
pkgs.verible
pkgs.zls
(import ./nvim-lsp.nix {inherit pkgs;})
vim
];
};
});
overlays = forAllSystems (system: let
vim = self.packages.${system};
pkgs = nixpkgsFor.${system};
in {
overlay = final: prev: {
inherit
(vim)
additionalDeps
;
};
});
defaultPackage = forAllSystems (system: self.packages.${system}.nvim);
};
}