at trunk 4.0 kB view raw
1{ 2 inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; 3 description = "nvim-candy"; 4 inputs.flake-parts = { 5 url = "github:hercules-ci/flake-parts"; 6 inputs.nixpkgs-lib.follows = "nixpkgs"; 7 }; 8 inputs.devshell.url = "github:numtide/devshell"; 9 inputs.nightly.url = "github:nix-community/neovim-nightly-overlay"; 10 11 inputs.tolerable.url = "github:wires-org/tolerable-nvim-nix"; 12 inputs.tolerable.inputs.nixpkgs.follows = "nixpkgs"; 13 inputs.tolerable.inputs.nightly.follows = "nightly"; 14 15 # Plugins 16 inputs.harpoon-nvim.url = "github:ThePrimeagen/harpoon/harpoon2"; 17 inputs.harpoon-nvim.flake = false; 18 inputs.stay-in-place-nvim.url = "github:gbprod/stay-in-place.nvim"; 19 inputs.stay-in-place-nvim.flake = false; 20 inputs.vim-firestore.url = "github:delphinus/vim-firestore"; 21 inputs.vim-firestore.flake = false; 22 23 outputs = 24 inputs: 25 inputs.flake-parts.lib.mkFlake { inherit inputs; } ( 26 { config, ... }: 27 { 28 systems = [ 29 "x86_64-linux" 30 "x86_64-darwin" 31 "aarch64-linux" 32 "aarch64-darwin" 33 ]; 34 35 imports = [ 36 inputs.devshell.flakeModule 37 ]; 38 39 perSystem = 40 { 41 inputs', 42 system, 43 config, 44 lib, 45 pkgs, 46 ... 47 }: 48 let 49 tolerableConfig = { 50 inherit pkgs; 51 src = lib.fileset.toSource { 52 root = ./.; 53 fileset = ./candy; 54 }; 55 path = with pkgs; [ 56 curl 57 git 58 stylua 59 prettierd 60 black 61 nixfmt-rfc-style 62 taplo 63 lua-language-server 64 nil 65 statix 66 nodePackages.typescript-language-server 67 tailwindcss-language-server 68 nodePackages.sql-formatter 69 gopls 70 golangci-lint-langserver 71 golangci-lint 72 pyright 73 tinymist 74 ripgrep 75 gdb 76 ]; 77 config = { 78 plugins = 79 let 80 opt = plugin: { 81 inherit plugin; 82 optional = true; 83 }; 84 in 85 with pkgs.vimPlugins; 86 [ 87 lz-n 88 nvim-treesitter.withAllGrammars 89 nvim-lspconfig 90 lackluster-nvim 91 everforest 92 mini-nvim 93 luasnip 94 (opt conform-nvim) 95 plenary-nvim 96 (pkgs.vimUtils.buildVimPlugin { 97 src = inputs.harpoon-nvim; 98 name = "harpoon"; 99 doCheck = false; 100 }) 101 rustaceanvim 102 typescript-tools-nvim 103 direnv-vim 104 vim-dotenv 105 (opt nvim-spider) 106 vim-fugitive 107 vim-gnupg 108 fidget-nvim 109 presence-nvim 110 hardtime-nvim 111 ]; 112 }; 113 }; 114 in 115 { 116 packages = { 117 neovim = inputs.tolerable.makeNightlyNeovimConfig "candy" tolerableConfig; 118 119 default = config.packages.neovim; 120 121 testing = inputs.tolerable.makeNightlyNeovimConfig "candy" ( 122 tolerableConfig 123 // { 124 testing = true; 125 } 126 ); 127 }; 128 }; 129 130 flake = 131 let 132 package = inputs.nixpkgs.lib.genAttrs config.systems ( 133 system: inputs.self.packages.${system}.default 134 ); 135 in 136 { 137 defaultPackage = package; 138 }; 139 } 140 ); 141}