nvf/flake.nix

720 lines
16 KiB
Nix
Raw Normal View History

{
2023-02-01 20:59:35 +00:00
description = "A neovim flake with a modular configuration";
outputs = {
2023-02-07 12:03:21 +00:00
flake-parts,
2023-03-31 21:57:25 +00:00
self,
2023-02-01 20:59:35 +00:00
...
} @ inputs: let
# call the extedended library with `inputs`
# inputs is used to get the original standard library, and to pass inputs to the plugin autodiscovery function
lib = import ./lib/stdlib-extended.nix inputs;
in
flake-parts.lib.mkFlake {
inherit inputs;
specialArgs = {inherit lib;};
} {
2024-09-28 20:32:25 +00:00
# Allow users to bring their own systems.
# «https://github.com/nix-systems/nix-systems»
systems = import inputs.systems;
2023-02-10 17:40:13 +00:00
imports = [
./flake/apps.nix
./flake/legacyPackages.nix
2023-02-10 17:45:23 +00:00
./flake/overlays.nix
2023-02-10 17:40:13 +00:00
./flake/packages.nix
];
2023-02-07 12:03:21 +00:00
flake = {
lib = {
inherit (lib) nvim;
inherit (lib.nvim) neovimConfiguration;
2023-02-06 01:14:01 +00:00
};
2023-04-02 16:10:24 +00:00
homeManagerModules = {
neovim-flake =
lib.warn ''
homeManagerModules.neovim-flake has been deprecated.
2024-06-10 07:33:45 +00:00
Plese use the homeManagerModules.nvf instead
''
self.homeManagerModules.nvf;
nvf = import ./flake/modules/home-manager.nix self.packages lib;
2023-04-02 16:10:24 +00:00
default = self.homeManagerModules.nvf;
};
2024-04-14 13:51:20 +00:00
nixosModules = {
neovim-flake =
lib.warn ''
nixosModules.neovim-flake has been deprecated.
Please use the nixosModules.nvf instead
''
2024-05-16 16:08:21 +00:00
self.nixosModules.nvf;
nvf = import ./flake/modules/nixos.nix self.packages lib;
2024-04-14 13:51:20 +00:00
default = self.nixosModules.nvf;
2024-04-14 13:51:20 +00:00
};
2023-02-01 20:59:35 +00:00
};
2023-02-07 12:03:21 +00:00
perSystem = {
self',
2023-02-10 17:40:13 +00:00
config,
pkgs,
2023-02-07 12:03:21 +00:00
...
}: {
devShells = {
default = self'.devShells.lsp;
nvim-nix = pkgs.mkShell {packages = [config.packages.nix];};
lsp = pkgs.mkShell {
packages = with pkgs; [nil statix deadnix alejandra];
};
};
2024-09-28 20:32:25 +00:00
# Provide the default formatter. `nix fmt` in project root
# will format available files with the correct formatter.
# P.S: Please do not format with nixfmt! It messes with many
# syntax elements and results in unreadable code.
formatter = pkgs.alejandra;
# Check if codebase is properly formatted.
# This can be initiated with `nix build .#checks.<system>.nix-fmt`
# or with `nix flake check`
checks = {
nix-fmt = pkgs.runCommand "nix-fmt-check" {nativeBuildInputs = [pkgs.alejandra];} ''
alejandra --check ${self} < /dev/null | tee $out
'';
};
2023-02-07 12:03:21 +00:00
};
};
# Flake inputs
inputs = {
2024-05-06 19:30:06 +00:00
## Basic Inputs
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
2023-02-07 12:03:21 +00:00
flake-parts.url = "github:hercules-ci/flake-parts";
2023-02-15 08:46:29 +00:00
flake-utils.url = "github:numtide/flake-utils";
systems.url = "github:nix-systems/default";
# Alternate neovim-wrapper
mnw.url = "github:Gerg-L/mnw";
# For generating documentation website
nmd = {
2023-12-09 19:03:58 +00:00
url = "sourcehut:~rycee/nmd";
flake = false;
};
# Language servers (use master instead of nixpkgs)
2024-04-08 00:28:49 +00:00
rnix-lsp.url = "github:nix-community/rnix-lsp";
nil = {
url = "github:oxalica/nil";
inputs.nixpkgs.follows = "nixpkgs";
inputs.flake-utils.follows = "flake-utils";
};
2024-05-06 19:30:06 +00:00
## Plugins
2024-09-30 19:55:37 +00:00
# Lazy loading
plugin-lz-n = {
url = "github:nvim-neorocks/lz.n";
flake = false;
};
plugin-lzn-auto-require = {
url = "github:horriblename/lzn-auto-require/require-rewrite";
flake = false;
};
2024-10-22 11:00:48 +00:00
plugin-rtp-nvim = {
url = "github:nvim-neorocks/rtp.nvim";
flake = false;
};
# LSP plugins
2024-04-08 00:28:49 +00:00
plugin-nvim-lspconfig = {
url = "github:neovim/nvim-lspconfig";
flake = false;
};
2023-04-15 09:43:39 +00:00
2024-04-08 00:28:49 +00:00
plugin-lspsaga = {
url = "github:tami5/lspsaga.nvim";
flake = false;
};
2023-04-15 09:43:39 +00:00
2024-04-08 00:28:49 +00:00
plugin-lspkind = {
url = "github:onsails/lspkind-nvim";
flake = false;
};
2023-04-15 09:43:39 +00:00
2024-04-08 00:28:49 +00:00
plugin-trouble = {
url = "github:folke/trouble.nvim";
flake = false;
};
2023-04-15 09:43:39 +00:00
2024-04-08 00:28:49 +00:00
plugin-nvim-treesitter-context = {
2023-04-17 23:10:40 +00:00
url = "github:nvim-treesitter/nvim-treesitter-context";
flake = false;
};
2023-04-15 09:43:39 +00:00
2024-04-08 00:28:49 +00:00
plugin-nvim-lightbulb = {
url = "github:kosayoda/nvim-lightbulb";
flake = false;
};
plugin-fastaction-nvim = {
url = "github:Chaitanyabsprip/fastaction.nvim";
flake = false;
};
2023-04-15 09:43:39 +00:00
2024-04-08 00:28:49 +00:00
plugin-lsp-signature = {
url = "github:ray-x/lsp_signature.nvim";
flake = false;
};
2023-04-15 09:43:39 +00:00
2024-04-08 00:28:49 +00:00
plugin-lsp-lines = {
2023-07-30 16:54:43 +00:00
url = "sourcehut:~whynothugo/lsp_lines.nvim";
flake = false;
};
2024-04-08 00:28:49 +00:00
plugin-none-ls = {
2024-03-09 02:32:01 +00:00
# https://github.com/nvimtools/none-ls.nvim/issues/58
url = "github:nvimtools/none-ls.nvim/bb680d752cec37949faca7a1f509e2fe67ab418a";
flake = false;
};
2023-04-15 09:43:39 +00:00
2024-04-08 00:28:49 +00:00
plugin-nvim-docs-view = {
url = "github:amrbashir/nvim-docs-view";
flake = false;
};
plugin-otter-nvim = {
url = "github:jmbuhr/otter.nvim";
flake = false;
};
# Language support
2024-04-08 00:28:49 +00:00
plugin-sqls-nvim = {
url = "github:nanotee/sqls.nvim";
flake = false;
};
2023-04-15 09:43:39 +00:00
plugin-rustaceanvim = {
url = "github:mrcjkb/rustaceanvim";
flake = false;
};
2024-04-08 00:28:49 +00:00
plugin-flutter-tools = {
url = "github:akinsho/flutter-tools.nvim";
flake = false;
};
2024-04-08 00:28:49 +00:00
plugin-neodev-nvim = {
2023-09-23 13:36:26 +00:00
url = "github:folke/neodev.nvim";
flake = false;
};
plugin-elixir-tools = {
url = "github:elixir-tools/elixir-tools.nvim";
2024-02-17 00:19:38 +00:00
flake = false;
};
plugin-ts-error-translator = {
url = "github:dmmulroy/ts-error-translator.nvim";
flake = false;
};
plugin-nvim-metals = {
url = "github:scalameta/nvim-metals";
flake = false;
};
2024-11-04 15:44:04 +00:00
plugin-omnisharp-extended = {
url = "github:Hoffs/omnisharp-extended-lsp.nvim";
flake = false;
};
plugin-csharpls-extended = {
url = "github:Decodetalkers/csharpls-extended-lsp.nvim";
flake = false;
};
# Copying/Registers
2024-04-08 00:28:49 +00:00
plugin-registers = {
url = "github:tversteeg/registers.nvim";
flake = false;
};
2023-07-19 19:49:06 +00:00
2024-04-08 00:28:49 +00:00
plugin-nvim-neoclip = {
url = "github:AckslD/nvim-neoclip.lua";
flake = false;
};
# Telescope
2024-04-08 00:28:49 +00:00
plugin-telescope = {
url = "github:nvim-telescope/telescope.nvim";
flake = false;
};
2023-05-04 15:41:11 +00:00
# Debuggers
2024-04-08 00:28:49 +00:00
plugin-nvim-dap = {
2023-05-04 15:41:11 +00:00
url = "github:mfussenegger/nvim-dap";
flake = false;
};
2024-04-08 00:28:49 +00:00
plugin-nvim-dap-ui = {
2023-05-04 15:41:11 +00:00
url = "github:rcarriga/nvim-dap-ui";
flake = false;
};
plugin-nvim-dap-go = {
url = "github:leoluz/nvim-dap-go";
flake = false;
};
# Filetrees
2024-04-08 00:28:49 +00:00
plugin-nvim-tree-lua = {
2023-02-03 07:36:08 +00:00
url = "github:nvim-tree/nvim-tree.lua";
flake = false;
};
plugin-neo-tree-nvim = {
url = "github:nvim-neo-tree/neo-tree.nvim";
flake = false;
};
# Tablines
2024-04-08 00:28:49 +00:00
plugin-nvim-bufferline-lua = {
url = "github:akinsho/nvim-bufferline.lua";
flake = false;
};
# Statuslines
2024-04-08 00:28:49 +00:00
plugin-lualine = {
url = "github:hoob3rt/lualine.nvim";
flake = false;
};
2024-04-08 00:28:49 +00:00
plugin-nvim-cmp = {
2023-07-30 15:38:29 +00:00
url = "github:hrsh7th/nvim-cmp";
flake = false;
};
2024-04-08 00:28:49 +00:00
plugin-cmp-buffer = {
url = "github:hrsh7th/cmp-buffer";
flake = false;
};
2024-04-08 00:28:49 +00:00
plugin-cmp-nvim-lsp = {
url = "github:hrsh7th/cmp-nvim-lsp";
flake = false;
};
2024-04-08 00:28:49 +00:00
plugin-cmp-path = {
url = "github:hrsh7th/cmp-path";
flake = false;
};
2024-04-08 00:28:49 +00:00
plugin-cmp-treesitter = {
url = "github:ray-x/cmp-treesitter";
flake = false;
};
plugin-cmp-luasnip = {
url = "github:saadparwaiz1/cmp_luasnip";
flake = false;
};
# snippets
plugin-luasnip = {
url = "github:L3MON4D3/LuaSnip";
flake = false;
};
plugin-friendly-snippets = {
url = "github:rafamadriz/friendly-snippets";
flake = false;
};
# Presence
2024-04-08 00:28:49 +00:00
plugin-neocord = {
url = "github:IogaMaster/neocord";
flake = false; # uses flake-utils, avoid the flake
};
# Autopairs
2024-04-08 00:28:49 +00:00
plugin-nvim-autopairs = {
url = "github:windwp/nvim-autopairs";
flake = false;
};
2024-04-08 00:28:49 +00:00
plugin-nvim-ts-autotag = {
url = "github:windwp/nvim-ts-autotag";
flake = false;
};
# Commenting
2024-04-08 00:28:49 +00:00
plugin-comment-nvim = {
url = "github:numToStr/Comment.nvim";
flake = false;
};
2024-04-08 00:28:49 +00:00
plugin-todo-comments = {
url = "github:folke/todo-comments.nvim";
flake = false;
};
# Buffer tools
2024-04-08 00:28:49 +00:00
plugin-bufdelete-nvim = {
url = "github:famiu/bufdelete.nvim";
flake = false;
};
2023-02-03 07:36:08 +00:00
# Dashboard Utilities
2024-04-08 00:28:49 +00:00
plugin-dashboard-nvim = {
2023-02-03 07:36:08 +00:00
url = "github:glepnir/dashboard-nvim";
flake = false;
};
2024-04-08 00:28:49 +00:00
plugin-alpha-nvim = {
2023-02-03 07:36:08 +00:00
url = "github:goolord/alpha-nvim";
flake = false;
};
2024-04-08 00:28:49 +00:00
plugin-vim-startify = {
2023-02-06 05:14:13 +00:00
url = "github:mhinz/vim-startify";
flake = false;
};
# Themes
plugin-base16 = {
url = "github:rrethy/base16-nvim";
flake = false;
};
2024-04-08 00:28:49 +00:00
plugin-tokyonight = {
url = "github:folke/tokyonight.nvim";
flake = false;
};
2024-04-08 00:28:49 +00:00
plugin-onedark = {
url = "github:navarasu/onedark.nvim";
flake = false;
};
2024-04-08 00:28:49 +00:00
plugin-catppuccin = {
url = "github:catppuccin/nvim";
flake = false;
};
2024-04-08 00:28:49 +00:00
plugin-dracula = {
2023-04-17 23:01:51 +00:00
url = "github:Mofiqul/dracula.nvim";
flake = false;
};
2024-04-08 00:28:49 +00:00
plugin-oxocarbon = {
url = "github:nyoom-engineering/oxocarbon.nvim";
flake = false;
};
2024-04-08 00:28:49 +00:00
plugin-gruvbox = {
2024-01-17 20:08:36 +00:00
url = "github:ellisonleao/gruvbox.nvim";
flake = false;
};
2024-04-08 00:28:49 +00:00
plugin-rose-pine = {
url = "github:rose-pine/neovim";
flake = false;
};
# Rust crates
2024-04-08 00:28:49 +00:00
plugin-crates-nvim = {
url = "github:Saecki/crates.nvim";
flake = false;
};
# Project Management
2024-04-08 00:28:49 +00:00
plugin-project-nvim = {
url = "github:ahmedkhalf/project.nvim";
flake = false;
};
# Visuals
2024-04-08 00:28:49 +00:00
plugin-nvim-cursorline = {
url = "github:yamatsum/nvim-cursorline";
flake = false;
};
2023-02-03 19:53:48 +00:00
2024-04-08 00:28:49 +00:00
plugin-scrollbar-nvim = {
2023-02-03 19:53:48 +00:00
url = "github:petertriho/nvim-scrollbar";
flake = false;
};
2024-04-08 00:28:49 +00:00
plugin-cinnamon-nvim = {
url = "github:declancm/cinnamon.nvim";
flake = false;
};
2024-04-08 00:28:49 +00:00
plugin-cellular-automaton = {
url = "github:Eandrju/cellular-automaton.nvim";
flake = false;
};
2024-04-08 00:28:49 +00:00
plugin-indent-blankline = {
url = "github:lukas-reineke/indent-blankline.nvim";
flake = false;
};
2024-04-08 00:28:49 +00:00
plugin-nvim-web-devicons = {
2023-05-26 13:08:23 +00:00
url = "github:nvim-tree/nvim-web-devicons";
flake = false;
};
2024-04-08 00:28:49 +00:00
plugin-gitsigns-nvim = {
url = "github:lewis6991/gitsigns.nvim";
flake = false;
};
plugin-vim-fugitive = {
url = "github:tpope/vim-fugitive";
flake = false;
};
2024-04-08 00:28:49 +00:00
plugin-fidget-nvim = {
url = "github:j-hui/fidget.nvim";
2023-02-27 19:30:12 +00:00
flake = false;
};
2024-04-08 00:28:49 +00:00
plugin-highlight-undo = {
url = "github:tzachar/highlight-undo.nvim";
flake = false;
};
2023-02-01 20:59:35 +00:00
# Minimap
2024-04-08 00:28:49 +00:00
plugin-minimap-vim = {
2023-02-01 20:59:35 +00:00
url = "github:wfxr/minimap.vim";
flake = false;
};
2024-04-08 00:28:49 +00:00
plugin-codewindow-nvim = {
url = "github:gorbit99/codewindow.nvim";
flake = false;
};
# Notifications
2024-04-08 00:28:49 +00:00
plugin-nvim-notify = {
url = "github:rcarriga/nvim-notify";
flake = false;
};
# Utilities
2024-04-08 00:28:49 +00:00
plugin-ccc = {
url = "github:uga-rosa/ccc.nvim";
flake = false;
};
2024-04-08 00:28:49 +00:00
plugin-diffview-nvim = {
2023-03-01 09:08:24 +00:00
url = "github:sindrets/diffview.nvim";
flake = false;
};
2024-04-08 00:28:49 +00:00
plugin-icon-picker-nvim = {
url = "github:ziontee113/icon-picker.nvim";
flake = false;
};
2024-04-08 00:28:49 +00:00
plugin-which-key = {
2023-02-06 05:14:13 +00:00
url = "github:folke/which-key.nvim";
flake = false;
};
2024-04-08 00:28:49 +00:00
plugin-cheatsheet-nvim = {
2023-02-06 05:14:13 +00:00
url = "github:sudormrfbin/cheatsheet.nvim";
flake = false;
};
2024-04-08 00:28:49 +00:00
plugin-gesture-nvim = {
2023-02-06 05:14:13 +00:00
url = "github:notomo/gesture.nvim";
flake = false;
};
2024-04-08 00:28:49 +00:00
plugin-hop-nvim = {
url = "github:phaazon/hop.nvim";
flake = false;
};
2023-02-05 22:09:12 +00:00
2024-04-08 00:28:49 +00:00
plugin-leap-nvim = {
2023-04-04 23:14:13 +00:00
url = "github:ggandor/leap.nvim";
flake = false;
};
2024-04-08 00:28:49 +00:00
plugin-smartcolumn = {
2023-04-05 13:59:08 +00:00
url = "github:m4xshen/smartcolumn.nvim";
flake = false;
};
2024-04-08 00:28:49 +00:00
plugin-nvim-surround = {
2023-06-07 11:28:27 +00:00
url = "github:kylechui/nvim-surround";
flake = false;
};
plugin-glow-nvim = {
url = "github:ellisonleao/glow.nvim";
flake = false;
};
plugin-image-nvim = {
url = "github:3rd/image.nvim";
flake = false;
};
# Note-taking
2024-04-08 00:28:49 +00:00
plugin-obsidian-nvim = {
2023-02-05 22:09:12 +00:00
url = "github:epwalsh/obsidian.nvim";
flake = false;
};
2024-04-08 00:28:49 +00:00
plugin-orgmode-nvim = {
2023-02-05 22:09:12 +00:00
url = "github:nvim-orgmode/orgmode";
flake = false;
};
2024-04-08 00:28:49 +00:00
plugin-mind-nvim = {
url = "github:phaazon/mind.nvim";
flake = false;
};
# Spellchecking
2024-04-08 00:28:49 +00:00
plugin-vim-dirtytalk = {
url = "github:psliwka/vim-dirtytalk";
flake = false;
};
2023-02-05 23:44:38 +00:00
# Terminal
2024-04-08 00:28:49 +00:00
plugin-toggleterm-nvim = {
2023-02-05 23:44:38 +00:00
url = "github:akinsho/toggleterm.nvim";
flake = false;
};
2023-02-06 01:14:01 +00:00
# UI
2024-04-08 00:28:49 +00:00
plugin-nvim-navbuddy = {
2023-07-19 19:49:06 +00:00
url = "github:SmiteshP/nvim-navbuddy";
flake = false;
};
2024-04-08 00:28:49 +00:00
plugin-nvim-navic = {
2023-07-19 19:49:06 +00:00
url = "github:SmiteshP/nvim-navic";
flake = false;
};
2024-04-08 00:28:49 +00:00
plugin-noice-nvim = {
2023-02-06 00:55:19 +00:00
url = "github:folke/noice.nvim";
flake = false;
};
2024-04-08 00:28:49 +00:00
plugin-modes-nvim = {
2023-04-03 09:12:05 +00:00
url = "github:mvllow/modes.nvim";
flake = false;
};
2024-04-08 00:28:49 +00:00
plugin-nvim-colorizer-lua = {
2024-02-10 01:04:51 +00:00
url = "github:NvChad/nvim-colorizer.lua";
2023-06-06 00:05:05 +00:00
flake = false;
};
2024-04-08 00:28:49 +00:00
plugin-vim-illuminate = {
2023-06-06 00:05:05 +00:00
url = "github:RRethy/vim-illuminate";
2023-04-03 09:12:05 +00:00
flake = false;
};
2023-02-06 01:14:01 +00:00
# Assistant
plugin-chatgpt = {
url = "github:jackMort/ChatGPT.nvim";
flake = false;
};
2024-04-08 00:28:49 +00:00
plugin-copilot-lua = {
2023-02-06 01:14:01 +00:00
url = "github:zbirenbaum/copilot.lua";
flake = false;
};
2024-04-08 00:28:49 +00:00
plugin-copilot-cmp = {
url = "github:zbirenbaum/copilot-cmp";
flake = false;
};
# Session management
2024-04-08 00:28:49 +00:00
plugin-nvim-session-manager = {
url = "github:Shatur/neovim-session-manager";
flake = false;
};
# Dependencies
2024-04-08 00:28:49 +00:00
plugin-plenary-nvim = {
# (required by crates-nvim)
url = "github:nvim-lua/plenary.nvim";
flake = false;
};
2024-04-08 00:28:49 +00:00
plugin-dressing-nvim = {
# (required by icon-picker-nvim)
url = "github:stevearc/dressing.nvim";
flake = false;
};
2023-02-05 22:09:12 +00:00
2024-04-08 00:28:49 +00:00
plugin-vim-markdown = {
2023-02-05 22:09:12 +00:00
# (required by obsidian-nvim)
url = "github:preservim/vim-markdown";
flake = false;
};
2024-04-08 00:28:49 +00:00
plugin-tabular = {
2023-02-05 22:09:12 +00:00
# (required by vim-markdown)
url = "github:godlygeek/tabular";
flake = false;
};
2023-02-06 00:55:19 +00:00
plugin-lua-utils-nvim = {
url = "github:nvim-neorg/lua-utils.nvim";
flake = false;
};
plugin-pathlib-nvim = {
url = "github:pysan3/pathlib.nvim";
flake = false;
};
plugin-neorg = {
url = "github:nvim-neorg/neorg";
flake = false;
};
plugin-neorg-telescope = {
url = "github:nvim-neorg/neorg-telescope";
flake = false;
};
2024-04-08 00:28:49 +00:00
plugin-nui-nvim = {
2023-02-06 05:14:13 +00:00
# (required by noice.nvim)
2023-02-06 00:55:19 +00:00
url = "github:MunifTanjim/nui.nvim";
flake = false;
};
2023-04-04 23:14:13 +00:00
2024-04-08 00:28:49 +00:00
plugin-vim-repeat = {
# (required by leap.nvim)
2023-04-04 23:14:13 +00:00
url = "github:tpope/vim-repeat";
flake = false;
};
2024-04-03 18:13:19 +00:00
2024-04-08 00:28:49 +00:00
plugin-nvim-nio = {
# (required by nvim-dap-ui)
2024-04-03 18:13:19 +00:00
url = "github:nvim-neotest/nvim-nio";
flake = false;
};
plugin-new-file-template-nvim = {
# (required by new-file-template.nvim)
url = "github:otavioschwanck/new-file-template.nvim";
flake = false;
};
2023-02-01 20:59:35 +00:00
};
}