Compare commits

4 Commits

Author SHA1 Message Date
asmir 9652f4cb75 repo: add gitignore 2023-10-27 01:40:00 +02:00
asmir df0441425f nixd: add config 2023-10-27 01:39:32 +02:00
asmir 6347d51dc2 lsp_servers: move packages from flake.nix to nvim-lsp.nix 2023-10-27 01:39:05 +02:00
asmir 3c95acb92e flake: update configuration, add proper outputs and arm64 target 2023-10-27 01:38:31 +02:00
5 changed files with 91 additions and 59 deletions
+1
View File
@@ -0,0 +1 @@
result
+1
View File
@@ -0,0 +1 @@
{"formatting":{"command":"alejandra"}}
Generated
+2 -3
View File
@@ -10,10 +10,9 @@
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "NixOS", "id": "nixpkgs",
"ref": "nixpkgs-unstable", "ref": "nixpkgs-unstable",
"repo": "nixpkgs", "type": "indirect"
"type": "github"
} }
}, },
"root": { "root": {
+18 -2
View File
@@ -2,19 +2,32 @@
description = "A very basic flake"; description = "A very basic flake";
inputs = { inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; nixpkgs.url = "nixpkgs/nixpkgs-unstable";
}; };
outputs = { outputs = {
self, self,
nixpkgs, nixpkgs,
}: let }: let
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; pkgs = nixpkgs.legacyPackages.x86_64-linux.pkgs;
in { in {
nvim = pkgs.mkShell { packages = forAllSystems (system: let
pkgs = nixpkgsFor.${system};
in {
nvim = import ./nvim-lsp.nix {inherit pkgs;};
});
devShells = forAllSystems (system: let
pkgs = nixpkgsFor.${system};
in {
default = pkgs.mkShell {
nativeBuildInputs = [ nativeBuildInputs = [
pkgs.alejandra pkgs.alejandra
pkgs.ccls pkgs.ccls
pkgs.gopls
pkgs.luaformatter pkgs.luaformatter
pkgs.nixd pkgs.nixd
pkgs.pyright pkgs.pyright
@@ -28,5 +41,8 @@
(import ./nvim-lsp.nix {inherit pkgs;}) (import ./nvim-lsp.nix {inherit pkgs;})
]; ];
}; };
});
defaultPackage = forAllSystems (system: self.packages.${system}.nvim);
}; };
} }
+17 -2
View File
@@ -7,7 +7,8 @@
EOF EOF
''; '';
packages.myPlugins.start = with pkgs.vimPlugins; [ packages.myPlugins.start = with pkgs.vimPlugins;
[
(nvim-treesitter.withPlugins (parsers: [ (nvim-treesitter.withPlugins (parsers: [
parsers.c parsers.c
parsers.cpp parsers.cpp
@@ -31,7 +32,6 @@
colorizer colorizer
fugitive fugitive
fzf-lua fzf-lua
gopls
gruvbox gruvbox
nvim-cmp nvim-cmp
nvim-lspconfig nvim-lspconfig
@@ -44,6 +44,21 @@
vim-slime vim-slime
vim-snippets vim-snippets
zig-vim zig-vim
]
++ [
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
]; ];
}; };
}; };