Created
July 21, 2024 06:41
-
-
Save my7h3le/613a8c127c1a80f3949501590f622feb to your computer and use it in GitHub Desktop.
Set up a minimal LazyVim setup using nixvim
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "nodes": { | |
| "devshell": { | |
| "inputs": { | |
| "flake-utils": "flake-utils", | |
| "nixpkgs": [ | |
| "nixvim", | |
| "nixpkgs" | |
| ] | |
| }, | |
| "locked": { | |
| "lastModified": 1717408969, | |
| "narHash": "sha256-Q0OEFqe35fZbbRPPRdrjTUUChKVhhWXz3T9ZSKmaoVY=", | |
| "owner": "numtide", | |
| "repo": "devshell", | |
| "rev": "1ebbe68d57457c8cae98145410b164b5477761f4", | |
| "type": "github" | |
| }, | |
| "original": { | |
| "owner": "numtide", | |
| "repo": "devshell", | |
| "type": "github" | |
| } | |
| }, | |
| "flake-compat": { | |
| "locked": { | |
| "lastModified": 1696426674, | |
| "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", | |
| "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", | |
| "revCount": 57, | |
| "type": "tarball", | |
| "url": "https://api.flakehub.com/f/pinned/edolstra/flake-compat/1.0.1/018afb31-abd1-7bff-a5e4-cff7e18efb7a/source.tar.gz" | |
| }, | |
| "original": { | |
| "type": "tarball", | |
| "url": "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz" | |
| } | |
| }, | |
| "flake-parts": { | |
| "inputs": { | |
| "nixpkgs-lib": [ | |
| "nixpkgs" | |
| ] | |
| }, | |
| "locked": { | |
| "lastModified": 1719994518, | |
| "narHash": "sha256-pQMhCCHyQGRzdfAkdJ4cIWiw+JNuWsTX7f0ZYSyz0VY=", | |
| "owner": "hercules-ci", | |
| "repo": "flake-parts", | |
| "rev": "9227223f6d922fee3c7b190b2cc238a99527bbb7", | |
| "type": "github" | |
| }, | |
| "original": { | |
| "owner": "hercules-ci", | |
| "repo": "flake-parts", | |
| "type": "github" | |
| } | |
| }, | |
| "flake-utils": { | |
| "inputs": { | |
| "systems": "systems" | |
| }, | |
| "locked": { | |
| "lastModified": 1701680307, | |
| "narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=", | |
| "owner": "numtide", | |
| "repo": "flake-utils", | |
| "rev": "4022d587cbbfd70fe950c1e2083a02621806a725", | |
| "type": "github" | |
| }, | |
| "original": { | |
| "owner": "numtide", | |
| "repo": "flake-utils", | |
| "type": "github" | |
| } | |
| }, | |
| "git-hooks": { | |
| "inputs": { | |
| "flake-compat": [ | |
| "nixvim", | |
| "flake-compat" | |
| ], | |
| "gitignore": "gitignore", | |
| "nixpkgs": [ | |
| "nixvim", | |
| "nixpkgs" | |
| ], | |
| "nixpkgs-stable": [ | |
| "nixvim", | |
| "nixpkgs" | |
| ] | |
| }, | |
| "locked": { | |
| "lastModified": 1720524665, | |
| "narHash": "sha256-ni/87oHPZm6Gv0ECYxr1f6uxB0UKBWJ6HvS7lwLU6oY=", | |
| "owner": "cachix", | |
| "repo": "git-hooks.nix", | |
| "rev": "8d6a17d0cdf411c55f12602624df6368ad86fac1", | |
| "type": "github" | |
| }, | |
| "original": { | |
| "owner": "cachix", | |
| "repo": "git-hooks.nix", | |
| "type": "github" | |
| } | |
| }, | |
| "gitignore": { | |
| "inputs": { | |
| "nixpkgs": [ | |
| "nixvim", | |
| "git-hooks", | |
| "nixpkgs" | |
| ] | |
| }, | |
| "locked": { | |
| "lastModified": 1709087332, | |
| "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=", | |
| "owner": "hercules-ci", | |
| "repo": "gitignore.nix", | |
| "rev": "637db329424fd7e46cf4185293b9cc8c88c95394", | |
| "type": "github" | |
| }, | |
| "original": { | |
| "owner": "hercules-ci", | |
| "repo": "gitignore.nix", | |
| "type": "github" | |
| } | |
| }, | |
| "home-manager": { | |
| "inputs": { | |
| "nixpkgs": [ | |
| "nixvim", | |
| "nixpkgs" | |
| ] | |
| }, | |
| "locked": { | |
| "lastModified": 1720734513, | |
| "narHash": "sha256-neWQ8eNtLTd+YMesb7WjKl1SVCbDyCm46LUgP/g/hdo=", | |
| "owner": "nix-community", | |
| "repo": "home-manager", | |
| "rev": "90ae324e2c56af10f20549ab72014804a3064c7f", | |
| "type": "github" | |
| }, | |
| "original": { | |
| "owner": "nix-community", | |
| "repo": "home-manager", | |
| "type": "github" | |
| } | |
| }, | |
| "nix-darwin": { | |
| "inputs": { | |
| "nixpkgs": [ | |
| "nixvim", | |
| "nixpkgs" | |
| ] | |
| }, | |
| "locked": { | |
| "lastModified": 1720845312, | |
| "narHash": "sha256-yPhAsJTpyoIPQZJGC8Fw8W2lAXyhLoTn+HP20bmfkfk=", | |
| "owner": "lnl7", | |
| "repo": "nix-darwin", | |
| "rev": "5ce8503cf402cf76b203eba4b7e402bea8e44abc", | |
| "type": "github" | |
| }, | |
| "original": { | |
| "owner": "lnl7", | |
| "repo": "nix-darwin", | |
| "type": "github" | |
| } | |
| }, | |
| "nixpkgs": { | |
| "locked": { | |
| "lastModified": 1721379653, | |
| "narHash": "sha256-8MUgifkJ7lkZs3u99UDZMB4kbOxvMEXQZ31FO3SopZ0=", | |
| "owner": "NixOS", | |
| "repo": "nixpkgs", | |
| "rev": "1d9c2c9b3e71b9ee663d11c5d298727dace8d374", | |
| "type": "github" | |
| }, | |
| "original": { | |
| "owner": "NixOS", | |
| "ref": "nixos-unstable", | |
| "repo": "nixpkgs", | |
| "type": "github" | |
| } | |
| }, | |
| "nixvim": { | |
| "inputs": { | |
| "devshell": "devshell", | |
| "flake-compat": "flake-compat", | |
| "flake-parts": [ | |
| "flake-parts" | |
| ], | |
| "git-hooks": "git-hooks", | |
| "home-manager": "home-manager", | |
| "nix-darwin": "nix-darwin", | |
| "nixpkgs": [ | |
| "nixpkgs" | |
| ], | |
| "treefmt-nix": "treefmt-nix" | |
| }, | |
| "locked": { | |
| "lastModified": 1721537578, | |
| "narHash": "sha256-rO7hoLFvfwiXa41IDt0U1hTuvxtAQbJX3XYFL7+EXP4=", | |
| "owner": "tashrifsanil", | |
| "repo": "nixvim", | |
| "rev": "1844d04b4d8a3442a6127a84d94025ae221bd71c", | |
| "type": "github" | |
| }, | |
| "original": { | |
| "owner": "tashrifsanil", | |
| "ref": "lazy-plugin-manager-enhancements", | |
| "repo": "nixvim", | |
| "type": "github" | |
| } | |
| }, | |
| "root": { | |
| "inputs": { | |
| "flake-parts": "flake-parts", | |
| "nixpkgs": "nixpkgs", | |
| "nixvim": "nixvim" | |
| } | |
| }, | |
| "systems": { | |
| "locked": { | |
| "lastModified": 1681028828, | |
| "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", | |
| "owner": "nix-systems", | |
| "repo": "default", | |
| "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", | |
| "type": "github" | |
| }, | |
| "original": { | |
| "owner": "nix-systems", | |
| "repo": "default", | |
| "type": "github" | |
| } | |
| }, | |
| "treefmt-nix": { | |
| "inputs": { | |
| "nixpkgs": [ | |
| "nixvim", | |
| "nixpkgs" | |
| ] | |
| }, | |
| "locked": { | |
| "lastModified": 1720818892, | |
| "narHash": "sha256-f52x9srIcqQm1Df3T+xYR5P6VfdnDFa2vkkcLhlTp6U=", | |
| "owner": "numtide", | |
| "repo": "treefmt-nix", | |
| "rev": "5b002f8a53ed04c1a4177e7b00809d57bd2c696f", | |
| "type": "github" | |
| }, | |
| "original": { | |
| "owner": "numtide", | |
| "repo": "treefmt-nix", | |
| "type": "github" | |
| } | |
| } | |
| }, | |
| "root": "root", | |
| "version": 7 | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| description = "Setup LazyVim using NixVim"; | |
| inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; | |
| inputs.nixvim.url = "github:tashrifsanil/nixvim/lazy-plugin-manager-enhancements"; | |
| inputs.nixvim.inputs.nixpkgs.follows = "nixpkgs"; | |
| inputs.nixvim.inputs.flake-parts.follows = "flake-parts"; | |
| inputs.flake-parts.url = "github:hercules-ci/flake-parts"; | |
| inputs.flake-parts.inputs.nixpkgs-lib.follows = "nixpkgs"; | |
| outputs = | |
| { | |
| self, | |
| nixpkgs, | |
| nixvim, | |
| flake-parts, | |
| }@inputs: | |
| flake-parts.lib.mkFlake { inherit inputs; } { | |
| systems = [ | |
| "aarch64-darwin" | |
| "aarch64-linux" | |
| "x86_64-darwin" | |
| "x86_64-linux" | |
| ]; | |
| perSystem = | |
| { | |
| pkgs, | |
| lib, | |
| system, | |
| ... | |
| }: | |
| let | |
| miniNvimModules = | |
| with pkgs.vimPlugins; | |
| [ mini-nvim ] | |
| ++ | |
| lib.map | |
| (miniModule: { | |
| name = "${miniModule}"; | |
| pkg = mini-nvim; | |
| }) | |
| [ | |
| "mini.ai" | |
| "mini.icons" | |
| "mini.move" | |
| "mini.pairs" | |
| "mini.splitjoin" | |
| "mini.trailspace" | |
| ]; | |
| lazyVimPlugins = | |
| with pkgs.vimPlugins; | |
| [ | |
| bufferline-nvim | |
| catppuccin-nvim | |
| cmp-buffer | |
| cmp-nvim-lsp | |
| cmp-path | |
| conform-nvim | |
| dashboard-nvim | |
| dressing-nvim | |
| flash-nvim | |
| friendly-snippets | |
| gitsigns-nvim | |
| indent-blankline-nvim | |
| lazydev-nvim | |
| lualine-nvim | |
| #luvit-meta | |
| mason-lspconfig-nvim | |
| mason-nvim | |
| mini-nvim | |
| neo-tree-nvim | |
| noice-nvim | |
| nui-nvim | |
| nvim-autopairs | |
| nvim-cmp | |
| nvim-lint | |
| nvim-lspconfig | |
| nvim-notify | |
| nvim-snippets | |
| nvim-spectre | |
| nvim-treesitter | |
| nvim-treesitter-textobjects | |
| nvim-ts-autotag | |
| persistence-nvim | |
| plenary-nvim | |
| telescope-fzf-native-nvim | |
| telescope-nvim | |
| todo-comments-nvim | |
| trouble-nvim | |
| ts-comments-nvim | |
| which-key-nvim | |
| tokyonight-nvim | |
| ] | |
| ++ miniNvimModules; | |
| config = { | |
| extraPackages = with pkgs; [ | |
| # LazyVim | |
| lua-language-server | |
| stylua | |
| # Telescope | |
| ripgrep | |
| ]; | |
| plugins = { | |
| lazy = { | |
| enable = true; | |
| plugins = with pkgs.vimPlugins; [ | |
| { | |
| pkg = LazyVim; | |
| import = "lazyvim.plugins"; | |
| packages = lazyVimPlugins; | |
| } | |
| { | |
| pkg = nvim-treesitter; | |
| opts = { | |
| highlight = { | |
| enable = true; | |
| }; | |
| ensure_installed = [ | |
| "vim" | |
| "regex" | |
| "lua" | |
| "bash" | |
| "markdown" | |
| "markdown_inline" | |
| ]; | |
| parser_install_dir.__raw = "vim.fs.joinpath(vim.fn.stdpath('data'), 'site')"; | |
| }; | |
| } | |
| { | |
| pkg = telescope-fzf-native-nvim; | |
| enabled = true; | |
| } | |
| { | |
| pkg = mason-nvim; | |
| enabled = false; | |
| } | |
| { | |
| pkg = mason-lspconfig-nvim; | |
| enabled = false; | |
| } | |
| ]; | |
| }; | |
| }; | |
| }; | |
| nixvim' = nixvim.legacyPackages."${system}"; | |
| nvim = nixvim'.makeNixvim config; | |
| in | |
| { | |
| packages = { | |
| inherit nvim; | |
| default = nvim; | |
| }; | |
| }; | |
| }; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment