diff --git a/common/nvim.nix b/common/nvim.nix index 1ddf6e2a..e4a2dea6 100644 --- a/common/nvim.nix +++ b/common/nvim.nix @@ -4,9 +4,10 @@ inputs, device, ... -}: { - imports = [inputs.nixneovim.nixosModules.default]; - programs.nixneovim = { +}: let +in { + imports = [inputs.nixvim.homeManagerModules.nixvim]; + programs.nixvim = { enable = true; extraPlugins = with pkgs.vimPlugins; [ # neorg @@ -54,6 +55,7 @@ rustaceanvim # No more postman + # rest-nvim.ftplugin rest-nvim # UI @@ -93,77 +95,89 @@ mapleader = " "; }; plugins = { - lspconfig = { - enable = true; - servers = { - gopls.enable = true; - nil = { - enable = true; - extraConfig = - # lua - '' - settings = { - ['nil'] = { - formatting = { - -- command = { "$\{pkgs.nixpkgs-fmt}/bin/nixpkgs-fmt" }, - -- command = { "$\{pkgs.nixfmt}/bin/nixfmt" }, - command = { "${pkgs.alejandra}/bin/alejandra" }, - }, - nix = { - flake = { - autoArchive = true, - }, - }, - }, - }, - ''; - }; - clangd.enable = true; - lua-language-server.enable = true; - jsonls.enable = true; - html.enable = true; - # pylyzer.enable = true; - sqls = { - enable = true; - onAttachExtra = - # lua - '' - require('sqls').on_attach(client, bufnr) - ''; - }; - # rust-analyzer.enable = true; - }; - extraLua.pre = - # lua - '' - local lsp_zero = require'lsp-zero' - local lspconfig = require 'lspconfig' - lsp_zero.on_attach(function(client, bufnr) - lsp_zero.default_keymaps({buffer = bufnr}) - if client.server_capabilities.inlayHintProvider then - vim.lsp.inlay_hint.enable(bufnr, true) - end - end) - ''; - # extraLua.post = '' - # vim.lsp.inlay_hint.enable(bufnr, true) - # ''; - }; + # lspconfig = { + # enable = true; + # servers = { + # gopls.enable = true; + # nil = { + # enable = true; + # extraConfig = + # /* + # lua + # */ + # '' + # settings = { + # ['nil'] = { + # formatting = { + # -- command = { "$\{pkgs.nixpkgs-fmt}/bin/nixpkgs-fmt" }, + # -- command = { "$\{pkgs.nixfmt}/bin/nixfmt" }, + # command = { "${pkgs.alejandra}/bin/alejandra" }, + # }, + # nix = { + # flake = { + # autoArchive = true, + # }, + # }, + # }, + # }, + # ''; + # }; + # clangd.enable = true; + # lua-language-server.enable = true; + # jsonls.enable = true; + # html.enable = true; + # # pylyzer.enable = true; + # sqls = { + # enable = true; + # onAttachExtra = + # /* + # lua + # */ + # '' + # require('sqls').on_attach(client, bufnr) + # ''; + # }; + # # rust-analyzer.enable = true; + # }; + # extraLua.pre = + # /* + # lua + # */ + # '' + # local lsp_zero = require'lsp-zero' + # local lspconfig = require 'lspconfig' + # lsp_zero.on_attach(function(client, bufnr) + # lsp_zero.default_keymaps({buffer = bufnr}) + # if client.server_capabilities.inlayHintProvider then + # vim.lsp.inlay_hint.enable(bufnr, true) + # end + # end) + # ''; + # # extraLua.post = '' + # # vim.lsp.inlay_hint.enable(bufnr, true) + # # ''; + # }; oil.enable = true; - nvim-dap.enable = true; - nvim-dap-ui.enable = true; + dap = { + enable = true; + extensions = { + dap-ui.enable = true; + dap-virtual-text.enable = true; + }; + }; todo-comments.enable = true; lualine.enable = true; commentary.enable = true; surround.enable = true; which-key.enable = true; - ufo.enable = true; + nvim-ufo.enable = true; fugitive.enable = true; markdown-preview = { enable = true; - autoStart = true; + settings.auto_start = true; }; + rest.enable = true; treesitter-context.enable = true; ts-context-commentstring.enable = true; @@ -171,24 +185,26 @@ enable = true; indent = true; folding = true; - refactor = { - smartRename = { - enable = true; - }; - }; - grammars = with pkgs.tree-sitter-grammars; [ - tree-sitter-just - tree-sitter-norg-meta - ]; - installAllGrammars = true; + # refactor = { + # smartRename = { + # enable = true; + # }; + # }; + # grammars = with pkgs.tree-sitter-grammars; [ + # tree-sitter-just + # tree-sitter-norg-meta + # ]; + # installAllGrammars = true; }; mini = { enable = true; - ai.enable = true; - # pairs.enable = true; - # cursorword.enable = true; - starter.enable = true; + modules = { + ai = {}; + starter = {}; + # pairs.enable = true; + # cursorword.enable = true; + }; }; }; colorschemes = { @@ -197,44 +213,44 @@ flavour = "mocha"; }; }; - mappings = { - normal = { - "ff" = "require'telescope.builtin'.find_files"; - "c" = "[[ChatGPT]]"; - "fb" = "require'telescope'.extensions.file_browser.file_browser"; - "gg" = "require'telescope.builtin'.live_grep"; - ";" = "require'telescope.builtin'.buffers"; - "o" = "[[TroubleToggle]]"; - "ee" = "require'rest-nvim'.run"; - "ec" = "function() require'rest-nvim'.run(true) end"; - "\\\"" = ''[["+]]''; - "vff" = "[[vertical Gdiffsplit]]"; - "" = "vim.lsp.buf.definition"; - "gi" = "require'telescope.builtin'.lsp_implementations"; - "gh" = "[[Octo actions]]"; - "a" = "vim.lsp.buf.code_action"; - "F" = "function() vim.lsp.buf.format({ async = true }) end"; - "" = "''"; - "q" = "[[bw]]"; - "n" = "[[bnext]]"; - "p" = "[[bprev]]"; - "\\\"" = "[[split]]"; - "%" = "[[vsplit]]"; - - "bb" = "require'dap'.toggle_breakpoint"; - "du" = "require'dapui'.toggle"; - "dr" = "[[RustLsp debuggables]]"; - - "" = "[[Outline]]"; - "" = "require('FTerm').toggle"; - }; - terminal = { - "" = "require('FTerm').toggle"; - }; - insert = { - "" = "require('FTerm').toggle"; - }; - }; + # mappings = { + # normal = { + # "ff" = "require'telescope.builtin'.find_files"; + # "c" = "[[ChatGPT]]"; + # "fb" = "require'telescope'.extensions.file_browser.file_browser"; + # "gg" = "require'telescope.builtin'.live_grep"; + # ";" = "require'telescope.builtin'.buffers"; + # "o" = "[[TroubleToggle]]"; + # "ee" = "[[Rest run]]"; + # "el" = "[[Rest run last]]"; + # "\\\"" = ''[["+]]''; + # "vff" = "[[vertical Gdiffsplit]]"; + # "" = "vim.lsp.buf.definition"; + # "gi" = "require'telescope.builtin'.lsp_implementations"; + # "gh" = "[[Octo actions]]"; + # "a" = "vim.lsp.buf.code_action"; + # "F" = "function() vim.lsp.buf.format({ async = true }) end"; + # "" = "''"; + # "q" = "[[bw]]"; + # "n" = "[[bnext]]"; + # "p" = "[[bprev]]"; + # "\\\"" = "[[split]]"; + # "%" = "[[vsplit]]"; + # + # "bb" = "require'dap'.toggle_breakpoint"; + # "du" = "require'dapui'.toggle"; + # "dr" = "[[RustLsp debuggables]]"; + # + # "" = "[[Outline]]"; + # "" = "require('FTerm').toggle"; + # }; + # terminal = { + # "" = "require('FTerm').toggle"; + # }; + # insert = { + # "" = "require('FTerm').toggle"; + # }; + # }; extraConfigLua = let codelldb = @@ -261,7 +277,17 @@ } }) - require('rest-nvim').setup() + -- do + -- function setup() + -- require('rest-nvim').setup() + -- end + -- success, output = pcall(setup) + -- if not success then + -- print("Failed to setup rest-nvim: " .. output) + -- end + -- end + + require('telescope').setup { defaults = { initial_mode = 'insert', diff --git a/flake.lock b/flake.lock index 4fdc917e..82994a00 100644 --- a/flake.lock +++ b/flake.lock @@ -176,6 +176,28 @@ "type": "github" } }, + "devshell": { + "inputs": { + "flake-utils": "flake-utils_9", + "nixpkgs": [ + "nixvim", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1710156081, + "narHash": "sha256-4PMY6aumJi5dLFjBzF5O4flKXmadMNq3AGUHKYfchh0=", + "owner": "numtide", + "repo": "devshell", + "rev": "bc68b058dc7e6d4d6befc4ec6c60082b6e844b7d", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "devshell", + "type": "github" + } + }, "fenix": { "inputs": { "nixpkgs": [ @@ -249,19 +271,17 @@ } }, "flake-compat_4": { - "flake": false, "locked": { "lastModified": 1696426674, "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", - "owner": "edolstra", - "repo": "flake-compat", "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", - "type": "github" + "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": { - "owner": "edolstra", - "repo": "flake-compat", - "type": "github" + "type": "tarball", + "url": "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz" } }, "flake-compat_5": { @@ -280,22 +300,6 @@ "type": "github" } }, - "flake-compat_6": { - "flake": false, - "locked": { - "lastModified": 1696426674, - "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", - "owner": "edolstra", - "repo": "flake-compat", - "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", - "type": "github" - }, - "original": { - "owner": "edolstra", - "repo": "flake-compat", - "type": "github" - } - }, "flake-parts": { "inputs": { "nixpkgs-lib": [ @@ -400,7 +404,10 @@ }, "flake-parts_6": { "inputs": { - "nixpkgs-lib": "nixpkgs-lib_2" + "nixpkgs-lib": [ + "nixvim", + "nixpkgs" + ] }, "locked": { "lastModified": 1709336216, @@ -416,24 +423,6 @@ "type": "github" } }, - "flake-parts_7": { - "inputs": { - "nixpkgs-lib": "nixpkgs-lib_3" - }, - "locked": { - "lastModified": 1706830856, - "narHash": "sha256-a0NYyp+h9hlb7ddVz4LUn1vT/PLwqfrWYcHMvFB1xYg=", - "owner": "hercules-ci", - "repo": "flake-parts", - "rev": "b253292d9c0a5ead9bc98c4e9a26c6312e27d69f", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "flake-parts", - "type": "github" - } - }, "flake-utils": { "inputs": { "systems": "systems" @@ -457,65 +446,11 @@ "systems": "systems_11" }, "locked": { - "lastModified": 1709126324, - "narHash": "sha256-q6EQdSeUZOG26WelxqkmR7kArjgWCdw5sfJVHPH/7j8=", + "lastModified": 1710146030, + "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", "owner": "numtide", "repo": "flake-utils", - "rev": "d465f4819400de7c8d874d50b982301f28a84605", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils_11": { - "inputs": { - "systems": "systems_12" - }, - "locked": { - "lastModified": 1701680307, - "narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "4022d587cbbfd70fe950c1e2083a02621806a725", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils_12": { - "inputs": { - "systems": "systems_13" - }, - "locked": { - "lastModified": 1701680307, - "narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "4022d587cbbfd70fe950c1e2083a02621806a725", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils_13": { - "inputs": { - "systems": "systems_14" - }, - "locked": { - "lastModified": 1701680307, - "narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "4022d587cbbfd70fe950c1e2083a02621806a725", + "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", "type": "github" }, "original": { @@ -654,11 +589,11 @@ "systems": "systems_10" }, "locked": { - "lastModified": 1709126324, - "narHash": "sha256-q6EQdSeUZOG26WelxqkmR7kArjgWCdw5sfJVHPH/7j8=", + "lastModified": 1701680307, + "narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=", "owner": "numtide", "repo": "flake-utils", - "rev": "d465f4819400de7c8d874d50b982301f28a84605", + "rev": "4022d587cbbfd70fe950c1e2083a02621806a725", "type": "github" }, "original": { @@ -667,25 +602,6 @@ "type": "github" } }, - "gen-luarc": { - "inputs": { - "flake-parts": "flake-parts_7", - "nixpkgs": "nixpkgs_7" - }, - "locked": { - "lastModified": 1708688915, - "narHash": "sha256-Vcfbdo2IOEiimRnehGLUM5l2VEIjZYZdKS0sjYWwfb4=", - "owner": "mrcjkb", - "repo": "nix-gen-luarc-json", - "rev": "6eb62734dae84e5f79368dfc545b3fff305df754", - "type": "github" - }, - "original": { - "owner": "mrcjkb", - "repo": "nix-gen-luarc-json", - "type": "github" - } - }, "gitignore": { "inputs": { "nixpkgs": [ @@ -711,18 +627,17 @@ "gitignore_2": { "inputs": { "nixpkgs": [ - "rustaceanvim", - "neorocks", + "nixvim", "pre-commit-hooks", "nixpkgs" ] }, "locked": { - "lastModified": 1703887061, - "narHash": "sha256-gGPa9qWNc6eCXT/+Z5/zMkyYOuRZqeFZBDbopNZQkuY=", + "lastModified": 1709087332, + "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=", "owner": "hercules-ci", "repo": "gitignore.nix", - "rev": "43e1aa1308018f37118e34d3a9cb4f5e75dc11d5", + "rev": "637db329424fd7e46cf4185293b9cc8c88c95394", "type": "github" }, "original": { @@ -731,47 +646,6 @@ "type": "github" } }, - "gitignore_3": { - "inputs": { - "nixpkgs": [ - "rustaceanvim", - "pre-commit-hooks", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1703887061, - "narHash": "sha256-gGPa9qWNc6eCXT/+Z5/zMkyYOuRZqeFZBDbopNZQkuY=", - "owner": "hercules-ci", - "repo": "gitignore.nix", - "rev": "43e1aa1308018f37118e34d3a9cb4f5e75dc11d5", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "gitignore.nix", - "type": "github" - } - }, - "haumea": { - "inputs": { - "nixpkgs": "nixpkgs_5" - }, - "locked": { - "lastModified": 1685133229, - "narHash": "sha256-FePm/Gi9PBSNwiDFq3N+DWdfxFq0UKsVVTJS3cQPn94=", - "owner": "nix-community", - "repo": "haumea", - "rev": "34dd58385092a23018748b50f9b23de6266dffc2", - "type": "github" - }, - "original": { - "owner": "nix-community", - "ref": "v0.2.2", - "repo": "haumea", - "type": "github" - } - }, "hercules-ci-effects": { "inputs": { "flake-parts": "flake-parts_5", @@ -817,16 +691,16 @@ "home-manager_2": { "inputs": { "nixpkgs": [ - "nixneovim", + "nixvim", "nixpkgs" ] }, "locked": { - "lastModified": 1710062421, - "narHash": "sha256-FiCNRfyUgJOLYIokLiFsfI7B+Zn9HDnOzFR3uVr5qsQ=", + "lastModified": 1710820906, + "narHash": "sha256-2bNMraoRB4pdw/HtxgYTFeMhEekBZeQ53/a8xkqpbZc=", "owner": "nix-community", "repo": "home-manager", - "rev": "36f873dfc8e2b6b89936ff3e2b74803d50447e0a", + "rev": "022464438a85450abb23d93b91aa82e0addd71fb", "type": "github" }, "original": { @@ -969,28 +843,6 @@ "type": "github" } }, - "neorocks": { - "inputs": { - "flake-compat": "flake-compat_4", - "flake-utils": "flake-utils_10", - "neovim-nightly": "neovim-nightly", - "nixpkgs": "nixpkgs_8", - "pre-commit-hooks": "pre-commit-hooks" - }, - "locked": { - "lastModified": 1709961913, - "narHash": "sha256-IRSChjhNfpqWKwiC83knmxJ3NUpgcAk4xj3SB99PVkQ=", - "owner": "nvim-neorocks", - "repo": "neorocks", - "rev": "b6f97791287e1974699fa502590c4c36b6a5faff", - "type": "github" - }, - "original": { - "owner": "nvim-neorocks", - "repo": "neorocks", - "type": "github" - } - }, "neovim-flake": { "inputs": { "flake-utils": "flake-utils_8", @@ -1015,31 +867,6 @@ "type": "github" } }, - "neovim-nightly": { - "inputs": { - "flake-utils": "flake-utils_11", - "nixpkgs": [ - "rustaceanvim", - "neorocks", - "nixpkgs" - ] - }, - "locked": { - "dir": "contrib", - "lastModified": 1709934546, - "narHash": "sha256-S24CAQvkeivCFM6tK4D10AEyjsMgE07XVgLIkrh6Ljc=", - "owner": "neovim", - "repo": "neovim", - "rev": "a69c72063994f8e9064b6d9c9f280120423897b8", - "type": "github" - }, - "original": { - "dir": "contrib", - "owner": "neovim", - "repo": "neovim", - "type": "github" - } - }, "neovim-nightly-overlay": { "inputs": { "flake-compat": "flake-compat_3", @@ -1084,41 +911,24 @@ "type": "github" } }, - "nix-flake-tests": { - "locked": { - "lastModified": 1677844186, - "narHash": "sha256-ErJZ/Gs1rxh561CJeWP5bohA2IcTq1rDneu1WT6CVII=", - "owner": "antifuchs", - "repo": "nix-flake-tests", - "rev": "bbd9216bd0f6495bb961a8eb8392b7ef55c67afb", - "type": "github" - }, - "original": { - "owner": "antifuchs", - "repo": "nix-flake-tests", - "type": "github" - } - }, - "nix-github-actions": { + "nix-darwin_2": { "inputs": { "nixpkgs": [ - "nixneovim", - "nixneovimplugins", - "poetry2nix", + "nixvim", "nixpkgs" ] }, "locked": { - "lastModified": 1688870561, - "narHash": "sha256-4UYkifnPEw1nAzqqPOTL2MvWtm3sNGw1UTYTalkTcGY=", - "owner": "nix-community", - "repo": "nix-github-actions", - "rev": "165b1650b753316aa7f1787f3005a8d2da0f5301", + "lastModified": 1710717205, + "narHash": "sha256-Wf3gHh5uV6W1TV/A8X8QJf99a5ypDSugY4sNtdJDe0A=", + "owner": "lnl7", + "repo": "nix-darwin", + "rev": "bcc8afd06e237df060c85bad6af7128e05fd61a3", "type": "github" }, "original": { - "owner": "nix-community", - "repo": "nix-github-actions", + "owner": "lnl7", + "repo": "nix-darwin", "type": "github" } }, @@ -1140,59 +950,6 @@ "type": "github" } }, - "nixneovim": { - "inputs": { - "flake-utils": "flake-utils_9", - "haumea": "haumea", - "home-manager": "home-manager_2", - "nix-flake-tests": "nix-flake-tests", - "nixneovimplugins": "nixneovimplugins", - "nixpkgs": [ - "nixpkgs" - ], - "nmd": "nmd", - "nmt": "nmt" - }, - "locked": { - "lastModified": 1710359927, - "narHash": "sha256-vq1fm2mXCfCOpyauqsuWsnFW3nS6ObczeHzrQ0+4J48=", - "owner": "uttarayan21", - "repo": "NixNeovim", - "rev": "af027313a773c1bd63f9e0160f1f482a23c99d23", - "type": "github" - }, - "original": { - "owner": "uttarayan21", - "repo": "NixNeovim", - "type": "github" - } - }, - "nixneovimplugins": { - "inputs": { - "flake-utils": [ - "nixneovim", - "flake-utils" - ], - "nixpkgs": [ - "nixneovim", - "nixpkgs" - ], - "poetry2nix": "poetry2nix" - }, - "locked": { - "lastModified": 1710080202, - "narHash": "sha256-2IF6b0ZDwdrP0h1/+Vw4arcfLk6sGKs0lfzqzJSv2wY=", - "owner": "nixneovim", - "repo": "nixneovimplugins", - "rev": "6c1112edd6f64a67e698ef8bd594e6f8e45893c4", - "type": "github" - }, - "original": { - "owner": "nixneovim", - "repo": "nixneovimplugins", - "type": "github" - } - }, "nixpkgs": { "locked": { "lastModified": 1706487304, @@ -1227,38 +984,17 @@ "type": "github" } }, - "nixpkgs-lib_2": { + "nixpkgs-main": { "locked": { - "dir": "lib", - "lastModified": 1709237383, - "narHash": "sha256-cy6ArO4k5qTx+l5o+0mL9f5fa86tYUX3ozE1S+Txlds=", - "owner": "NixOS", + "lastModified": 1711054707, + "narHash": "sha256-DSww15yQ7ICWZ/B7Bm+mZkURoYBTtF9UEAmwea1Je2w=", + "owner": "nixos", "repo": "nixpkgs", - "rev": "1536926ef5621b09bba54035ae2bb6d806d72ac8", + "rev": "38d8d0e7ea26033834f8e1138bdeaaa952c6f77b", "type": "github" }, "original": { - "dir": "lib", - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-lib_3": { - "locked": { - "dir": "lib", - "lastModified": 1706550542, - "narHash": "sha256-UcsnCG6wx++23yeER4Hg18CXWbgNpqNXcHIo5/1Y+hc=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "97b17f32362e475016f942bbdfda4a4a72a8a652", - "type": "github" - }, - "original": { - "dir": "lib", - "owner": "NixOS", - "ref": "nixos-unstable", + "owner": "nixos", "repo": "nixpkgs", "type": "github" } @@ -1279,38 +1015,6 @@ "type": "github" } }, - "nixpkgs-stable_2": { - "locked": { - "lastModified": 1704874635, - "narHash": "sha256-YWuCrtsty5vVZvu+7BchAxmcYzTMfolSPP5io8+WYCg=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "3dc440faeee9e889fe2d1b4d25ad0f430d449356", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-23.11", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-stable_3": { - "locked": { - "lastModified": 1704874635, - "narHash": "sha256-YWuCrtsty5vVZvu+7BchAxmcYzTMfolSPP5io8+WYCg=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "3dc440faeee9e889fe2d1b4d25ad0f430d449356", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-23.11", - "repo": "nixpkgs", - "type": "github" - } - }, "nixpkgs_2": { "locked": { "lastModified": 1706487304, @@ -1358,21 +1062,6 @@ } }, "nixpkgs_5": { - "locked": { - "lastModified": 1681001314, - "narHash": "sha256-5sDnCLdrKZqxLPK4KA8+f4A3YKO/u6ElpMILvX0g72c=", - "owner": "nix-community", - "repo": "nixpkgs.lib", - "rev": "367c0e1086a4eb4502b24d872cea2c7acdd557f4", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "nixpkgs.lib", - "type": "github" - } - }, - "nixpkgs_6": { "locked": { "lastModified": 1710806803, "narHash": "sha256-qrxvLS888pNJFwJdK+hf1wpRCSQcqA6W5+Ox202NDa0=", @@ -1388,84 +1077,29 @@ "type": "github" } }, - "nixpkgs_7": { + "nixvim": { + "inputs": { + "devshell": "devshell", + "flake-compat": "flake-compat_4", + "flake-parts": "flake-parts_6", + "home-manager": "home-manager_2", + "nix-darwin": "nix-darwin_2", + "nixpkgs": [ + "nixpkgs" + ], + "pre-commit-hooks": "pre-commit-hooks" + }, "locked": { - "lastModified": 1708475490, - "narHash": "sha256-g1v0TsWBQPX97ziznfJdWhgMyMGtoBFs102xSYO4syU=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "0e74ca98a74bc7270d28838369593635a5db3260", + "lastModified": 1710936779, + "narHash": "sha256-ecYnUzSWqRae10pp7J6ZE2BznTPJ9f8sLiIoDBQtRBw=", + "owner": "nix-community", + "repo": "nixvim", + "rev": "4f6e90212c7ec56d7c03611fb86befa313e7f61f", "type": "github" }, "original": { - "owner": "nixos", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_8": { - "locked": { - "lastModified": 1709780214, - "narHash": "sha256-p4iDKdveHMhfGAlpxmkCtfQO3WRzmlD11aIcThwPqhk=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "f945939fd679284d736112d3d5410eb867f3b31c", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_9": { - "locked": { - "lastModified": 1704842529, - "narHash": "sha256-OTeQA+F8d/Evad33JMfuXC89VMetQbsU4qcaePchGr4=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "eabe8d3eface69f5bb16c18f8662a702f50c20d5", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nmd": { - "flake": false, - "locked": { - "lastModified": 1672949361, - "narHash": "sha256-WWg1kbilAb3sA+RoJtSYfAZvyYu1Nk79ocHaerwbQxQ=", - "owner": "~rycee", - "repo": "nmd", - "rev": "fb9cf8e991487c6923f3c654b8ae51b6f0f205ce", - "type": "sourcehut" - }, - "original": { - "owner": "~rycee", - "repo": "nmd", - "rev": "fb9cf8e991487c6923f3c654b8ae51b6f0f205ce", - "type": "sourcehut" - } - }, - "nmt": { - "flake": false, - "locked": { - "lastModified": 1709382952, - "narHash": "sha256-n/BvuWVcQxaXCU30feNRqWWqabhIIO2+tRFnhLIhjiQ=", - "owner": "jooooscha", - "repo": "nmt", - "rev": "86a09994d1007c39a1f4d386e3caea9b4681d9d6", - "type": "github" - }, - "original": { - "owner": "jooooscha", - "repo": "nmt", + "owner": "nix-community", + "repo": "nixvim", "type": "github" } }, @@ -1484,52 +1118,26 @@ "type": "github" } }, - "poetry2nix": { + "pre-commit-hooks": { "inputs": { - "flake-utils": [ - "nixneovim", - "nixneovimplugins", - "flake-utils" - ], - "nix-github-actions": "nix-github-actions", + "flake-compat": "flake-compat_5", + "flake-utils": "flake-utils_10", + "gitignore": "gitignore_2", "nixpkgs": [ - "nixneovim", - "nixneovimplugins", + "nixvim", + "nixpkgs" + ], + "nixpkgs-stable": [ + "nixvim", "nixpkgs" ] }, "locked": { - "lastModified": 1689849924, - "narHash": "sha256-d259Z2S7CS7Na04qQNQ6LYQILuI7cf4Rpe76qc4mz40=", - "owner": "nix-community", - "repo": "poetry2nix", - "rev": "1d7eda9336f336392d24e9602be5cb9be7ae405c", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "poetry2nix", - "type": "github" - } - }, - "pre-commit-hooks": { - "inputs": { - "flake-compat": "flake-compat_5", - "flake-utils": "flake-utils_12", - "gitignore": "gitignore_2", - "nixpkgs": [ - "rustaceanvim", - "neorocks", - "nixpkgs" - ], - "nixpkgs-stable": "nixpkgs-stable_2" - }, - "locked": { - "lastModified": 1708018599, - "narHash": "sha256-M+Ng6+SePmA8g06CmUZWi1AjG2tFBX9WCXElBHEKnyM=", + "lastModified": 1710843117, + "narHash": "sha256-b6iKQeHegzpc697rxTPA3bpwGN3m50eLCgdQOmceFuE=", "owner": "cachix", "repo": "pre-commit-hooks.nix", - "rev": "5df5a70ad7575f6601d91f0efec95dd9bc619431", + "rev": "e8dc1b4fe80c6fcededde7700e6a23bcdf7f3347", "type": "github" }, "original": { @@ -1569,28 +1177,6 @@ "type": "github" } }, - "pre-commit-hooks_2": { - "inputs": { - "flake-compat": "flake-compat_6", - "flake-utils": "flake-utils_13", - "gitignore": "gitignore_3", - "nixpkgs": "nixpkgs_9", - "nixpkgs-stable": "nixpkgs-stable_3" - }, - "locked": { - "lastModified": 1708018599, - "narHash": "sha256-M+Ng6+SePmA8g06CmUZWi1AjG2tFBX9WCXElBHEKnyM=", - "owner": "cachix", - "repo": "pre-commit-hooks.nix", - "rev": "5df5a70ad7575f6601d91f0efec95dd9bc619431", - "type": "github" - }, - "original": { - "owner": "cachix", - "repo": "pre-commit-hooks.nix", - "type": "github" - } - }, "root": { "inputs": { "anyrun": "anyrun", @@ -1606,10 +1192,10 @@ "neovim-nightly-overlay": "neovim-nightly-overlay", "nix-darwin": "nix-darwin", "nix-index-database": "nix-index-database", - "nixneovim": "nixneovim", - "nixpkgs": "nixpkgs_6", - "nur": "nur", - "rustaceanvim": "rustaceanvim" + "nixpkgs": "nixpkgs_5", + "nixpkgs-main": "nixpkgs-main", + "nixvim": "nixvim", + "nur": "nur" } }, "rust-overlay": { @@ -1724,30 +1310,6 @@ "type": "github" } }, - "rustaceanvim": { - "inputs": { - "flake-parts": "flake-parts_6", - "gen-luarc": "gen-luarc", - "neorocks": "neorocks", - "nixpkgs": [ - "nixpkgs" - ], - "pre-commit-hooks": "pre-commit-hooks_2" - }, - "locked": { - "lastModified": 1710468696, - "narHash": "sha256-kd0IgnjkLWGgNE1WoY4w6WpTpZBkE/YH6Y1mbupHJFs=", - "owner": "mrcjkb", - "repo": "rustaceanvim", - "rev": "69a22c2ec63ab375190006751562b62ebb318250", - "type": "github" - }, - "original": { - "owner": "mrcjkb", - "repo": "rustaceanvim", - "type": "github" - } - }, "systems": { "locked": { "lastModified": 1681028828, @@ -1793,51 +1355,6 @@ "type": "github" } }, - "systems_12": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, - "systems_13": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, - "systems_14": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, "systems_2": { "locked": { "lastModified": 1681028828, diff --git a/flake.nix b/flake.nix index 7ef326b7..dd9a14ae 100644 --- a/flake.nix +++ b/flake.nix @@ -2,6 +2,8 @@ description = "Home Manager configuration of fs0c131y"; inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; + nixpkgs-main.url = "github:nixos/nixpkgs"; + home-manager = { url = "github:nix-community/home-manager"; inputs.nixpkgs.follows = "nixpkgs"; @@ -40,20 +42,14 @@ url = "github:nix-community/lanzaboote"; inputs.nixpkgs.follows = "nixpkgs"; }; - nixneovim = { - # url = "github:nixneovim/nixneovim"; - url = "github:uttarayan21/NixNeovim"; + nixvim = { + url = "github:nix-community/nixvim"; inputs.nixpkgs.follows = "nixpkgs"; - # patches = [ ./patches/nixneovim.patch ]; }; - # nixneovimplugins = { - # url = "github:NixNeovim/NixNeovimPlugins"; + # rustaceanvim = { + # url = "github:mrcjkb/rustaceanvim"; # inputs.nixpkgs.follows = "nixpkgs"; - # } - rustaceanvim = { - url = "github:mrcjkb/rustaceanvim"; - inputs.nixpkgs.follows = "nixpkgs"; - }; + # }; nix-index-database.url = "github:Mic92/nix-index-database"; music-player = { url = "github:tsirysndr/music-player"; diff --git a/overlays.nix b/overlays.nix index d6cfccde..1df8e453 100644 --- a/overlays.nix +++ b/overlays.nix @@ -157,17 +157,6 @@ sha256 = "sha256-HaxfnvgFy7fpa2CS7/dQhf6dK9+Js7wP5qGdIeXLGPY"; }; }; - rest-nvim = final.pkgs.vimUtils.buildVimPlugin { - name = "rest-nvim"; - src = final.pkgs.fetchFromGitHub { - owner = "rest-nvim"; - repo = "rest.nvim"; - rev = "c12c0b06ce5a09d83e79c8464f09d21fdd6b32d6"; - # sha256 = "sha256-3EC0j/hEbdQ8nJU0I+LGmE/zNnglO/FrP/6POer0338"; - # sha256 = "sha256-3EC0j/hEbdQ8nJU0I+LGmE/zNnglO/FrP/6POer0339"; - sha256 = "sha256-rp1DkX3i+qZxvcsPXEKPiFLSfWbetRm0/cEAWBoBOic="; - }; - }; }; }; tmuxPlugins = final: prev: { @@ -221,6 +210,31 @@ }; }; }; + + rest-nvim-overlay = final: prev: let + rest-nvim-src = final.pkgs.fetchFromGitHub { + owner = "rest-nvim"; + repo = "rest.nvim"; + rev = "v2.0.0"; + # sha256 = "sha256-3EC0j/hEbdQ8nJU0I+LGmE/zNnglO/FrP/6POer0338"; + # sha256 = "sha256-3EC0j/hEbdQ8nJU0I+LGmE/zNnglO/FrP/6POer0339"; + sha256 = "sha256-d/2aiQZ4YpZ//j6N4boU5ASVFJcErwpK/9PCisEXoxg="; + }; + in { + vimPlugins = + prev.vimPlugins + // { + rest-nvim = final.neovimUtils.buildNeovimPlugin { + pname = "rest.nvim"; + version = "scm-1"; + src = rest-nvim-src; + postInstall = '' + mkdir -p $out/ + cp -r ftplugin ftdetect syntax $out/ + ''; + }; + }; + }; in [ catppuccinThemes vimPlugins @@ -231,7 +245,8 @@ in [ shell-scipts misc-applications inputs.neovim-nightly-overlay.overlay - inputs.nixneovim.overlays.default - inputs.nur.overlay # inputs.rustaceanvim.overlays.default + # inputs.nixneovim.overlays.default + inputs.nur.overlay + rest-nvim-overlay ]