nvim_flake/flake.nix

76 lines
1.6 KiB
Nix
Raw Normal View History

2023-07-07 12:44:05 +02:00
{
description = "A very basic flake";
inputs = {
nixpkgs.url = "nixpkgs/nixpkgs-unstable";
2023-07-07 12:44:05 +02:00
};
outputs = {
self,
nixpkgs,
}: let
supportedSystems = ["x86_64-linux" "aarch64-linux"];
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
nixpkgsFor = forAllSystems (system: import nixpkgs {inherit system;});
2024-01-27 19:10:17 +01:00
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
];
2023-07-07 12:44:05 +02:00
in {
packages = forAllSystems (system: let
pkgs = nixpkgsFor.${system};
in {
nvim = import ./nvim-lsp.nix {inherit pkgs;};
});
devShells = forAllSystems (system: let
pkgs = nixpkgsFor.${system};
2024-01-27 19:10:17 +01:00
vim = self.packages.${system};
in {
default = pkgs.mkShell {
nativeBuildInputs = [
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
2024-01-27 19:10:17 +01:00
vim
];
};
});
2024-01-27 19:10:17 +01:00
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);
2023-07-07 12:44:05 +02:00
};
}