79 lines
1.8 KiB
Nix
79 lines
1.8 KiB
Nix
{
|
|
description = "A very basic flake";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11";
|
|
};
|
|
|
|
outputs = {
|
|
self,
|
|
nixpkgs,
|
|
}: let
|
|
supportedSystems = ["x86_64-linux" "aarch64-linux"];
|
|
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
|
|
nixpkgsFor = forAllSystems (system: import nixpkgs {inherit system;});
|
|
in {
|
|
packages = forAllSystems (system: let
|
|
pkgs = nixpkgsFor.${system};
|
|
neovim = import ./nvim-lsp.nix {inherit pkgs;};
|
|
in {
|
|
nvim = pkgs.symlinkJoin {
|
|
name = "nvim";
|
|
paths = with pkgs;
|
|
[
|
|
alejandra
|
|
ccls
|
|
gopls
|
|
luaformatter
|
|
nixd
|
|
nixfmt-rfc-style
|
|
pyright
|
|
rust-analyzer
|
|
sumneko-lua-language-server
|
|
svls
|
|
texlab
|
|
tree-sitter
|
|
typst-lsp
|
|
verible
|
|
yaml-language-server
|
|
zls
|
|
]
|
|
++ [neovim];
|
|
};
|
|
});
|
|
|
|
devShells = forAllSystems (system: let
|
|
pkgs = nixpkgsFor.${system};
|
|
in {
|
|
default = pkgs.mkShell {
|
|
nativeBuildInputs = [
|
|
pkgs.alejandra
|
|
pkgs.ccls
|
|
pkgs.gopls
|
|
pkgs.luaformatter
|
|
pkgs.nixd
|
|
pkgs.nixfmt-rfc-style
|
|
pkgs.pyright
|
|
pkgs.rust-analyzer
|
|
pkgs.sumneko-lua-language-server
|
|
pkgs.svls
|
|
pkgs.texlab
|
|
pkgs.tree-sitter
|
|
pkgs.verible
|
|
pkgs.zls
|
|
(import ./nvim-lsp.nix {inherit pkgs;})
|
|
];
|
|
};
|
|
});
|
|
|
|
overlays = forAllSystems (system: let
|
|
pkgs = nixpkgsFor.${system};
|
|
in {
|
|
overlay = final: prev: {
|
|
nvim = self.packages.${system}.nvim;
|
|
};
|
|
});
|
|
defaultPackage = forAllSystems (system: self.packages.${system}.nvim);
|
|
};
|
|
}
|