From 48ee2d8c65df82ec7dd70283ce7498a5c23d2a05 Mon Sep 17 00:00:00 2001 From: Jeremy Wall Date: Mon, 5 May 2025 11:36:52 -0400 Subject: [PATCH] feat: mcp-hub integration --- nix/base-system/flake.lock | 417 +++++++++++++++++++++++++------------ nix/base-system/flake.nix | 180 ++++++++-------- nix/base-system/init.lua | 38 +++- 3 files changed, 411 insertions(+), 224 deletions(-) diff --git a/nix/base-system/flake.lock b/nix/base-system/flake.lock index 4b5f2d1..cac9864 100644 --- a/nix/base-system/flake.lock +++ b/nix/base-system/flake.lock @@ -48,6 +48,7 @@ "inputs": { "d2-vim-src": "d2-vim-src", "flake-utils": "flake-utils_3", + "gomod2nix-src": "gomod2nix-src", "hunk-nvim-src": "hunk-nvim-src", "ionide-nvim-src": "ionide-nvim-src", "naersk": "naersk_2", @@ -62,14 +63,15 @@ "tree-sitter-cli-src": "tree-sitter-cli-src", "treesitter-context": "treesitter-context", "victoria-logs-src": "victoria-logs-src", + "victoria-metrics-src": "victoria-metrics-src", "zig-src": "zig-src" }, "locked": { - "lastModified": 1732111397, - "narHash": "sha256-2qTl0546a5xZySPdN23gFhz48V6tA2INDjKm4NPBMTs=", + "lastModified": 1746458473, + "narHash": "sha256-3FFhJ18MJFlHHI1YaMKRwXURcQjmLenxIcLFtr+CjGI=", "owner": "zaphar", "repo": "nix-flakes", - "rev": "be1645a420b26b5a69a734db8596351a51d5a021", + "rev": "91588e10769e706024d8d03ebb4958c89e00c264", "type": "github" }, "original": { @@ -155,7 +157,7 @@ "durnitisp-flake": { "inputs": { "flake-compat": "flake-compat_2", - "flake-utils": "flake-utils_5", + "flake-utils": "flake-utils_6", "naersk": "naersk_3" }, "locked": { @@ -252,6 +254,27 @@ "type": "github" } }, + "flake-parts": { + "inputs": { + "nixpkgs-lib": [ + "mcphub-flake", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1743550720, + "narHash": "sha256-hIshGgKZCgWh6AYJpJmRgFdR3WUbkY04o82X05xqQiY=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "c621e8422220273271f52058f618c94e405bb0f5", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, "flake-utils": { "inputs": { "systems": "systems" @@ -274,6 +297,24 @@ "inputs": { "systems": "systems_9" }, + "locked": { + "lastModified": 1710146030, + "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_11": { + "inputs": { + "systems": "systems_10" + }, "locked": { "lastModified": 1687709756, "narHash": "sha256-Y5wKlQSkgEK2weWdOu4J3riRd+kV/VCgHsqLNTTWQ/0=", @@ -288,7 +329,7 @@ "type": "github" } }, - "flake-utils_11": { + "flake-utils_12": { "locked": { "lastModified": 1649676176, "narHash": "sha256-OWKJratjt2RW151VUlJPRALb7OU2S5s+f0vLj4o1bHM=", @@ -303,9 +344,9 @@ "type": "github" } }, - "flake-utils_12": { + "flake-utils_13": { "inputs": { - "systems": "systems_10" + "systems": "systems_11" }, "locked": { "lastModified": 1705309234, @@ -321,9 +362,9 @@ "type": "github" } }, - "flake-utils_13": { + "flake-utils_14": { "inputs": { - "systems": "systems_11" + "systems": "systems_12" }, "locked": { "lastModified": 1726560853, @@ -339,9 +380,9 @@ "type": "github" } }, - "flake-utils_14": { + "flake-utils_15": { "inputs": { - "systems": "systems_12" + "systems": "systems_13" }, "locked": { "lastModified": 1681202837, @@ -397,6 +438,24 @@ "inputs": { "systems": "systems_4" }, + "locked": { + "lastModified": 1694529238, + "narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "ff7b65b44d01cf9ba6a71320833626af21126384", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_5": { + "inputs": { + "systems": "systems_5" + }, "locked": { "lastModified": 1710146030, "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", @@ -411,7 +470,7 @@ "type": "github" } }, - "flake-utils_5": { + "flake-utils_6": { "locked": { "lastModified": 1644229661, "narHash": "sha256-1YdnJAsNy69bpcjuoKdOYQX0YxZBiCYZo4Twxerqv7k=", @@ -426,24 +485,6 @@ "type": "github" } }, - "flake-utils_6": { - "inputs": { - "systems": "systems_5" - }, - "locked": { - "lastModified": 1705309234, - "narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, "flake-utils_7": { "inputs": { "systems": "systems_6" @@ -467,11 +508,11 @@ "systems": "systems_7" }, "locked": { - "lastModified": 1731533236, - "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "lastModified": 1705309234, + "narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=", "owner": "numtide", "repo": "flake-utils", - "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26", "type": "github" }, "original": { @@ -485,11 +526,11 @@ "systems": "systems_8" }, "locked": { - "lastModified": 1710146030, - "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", "owner": "numtide", "repo": "flake-utils", - "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", "type": "github" }, "original": { @@ -519,6 +560,25 @@ "type": "github" } }, + "gomod2nix-src": { + "inputs": { + "flake-utils": "flake-utils_4", + "nixpkgs": "nixpkgs_3" + }, + "locked": { + "lastModified": 1745875161, + "narHash": "sha256-0YkWCS13jpoo3+sX/3kcgdxBNt1VZTmvF+FhZb4rFKI=", + "owner": "nix-community", + "repo": "gomod2nix", + "rev": "2cbd7fdd6eeab65c494cc426e18f4e4d2a5e35c0", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "gomod2nix", + "type": "github" + } + }, "harpoon-src": { "flake": false, "locked": { @@ -539,9 +599,9 @@ "heracles-flake": { "inputs": { "flake-compat": "flake-compat_3", - "flake-utils": "flake-utils_6", + "flake-utils": "flake-utils_7", "naersk": "naersk_4", - "nixpkgs": "nixpkgs_8", + "nixpkgs": "nixpkgs_9", "rust-overlay": "rust-overlay_4" }, "locked": { @@ -613,8 +673,8 @@ }, "jujutsu-flake": { "inputs": { - "flake-utils": "flake-utils_8", - "nixpkgs": "nixpkgs_9", + "flake-utils": "flake-utils_9", + "nixpkgs": "nixpkgs_10", "rust-overlay": "rust-overlay_5" }, "locked": { @@ -647,6 +707,26 @@ "type": "github" } }, + "mcphub-flake": { + "inputs": { + "flake-parts": "flake-parts", + "nixpkgs": "nixpkgs_11" + }, + "locked": { + "lastModified": 1746274546, + "narHash": "sha256-NdBF9cU7tyYQZBZ/dpUDami+uF7UDNqdCazyiW3uhIM=", + "owner": "ravitemer", + "repo": "mcphub.nvim", + "rev": "966a95e76d35fb841e0ead972f204677c42a4d3c", + "type": "github" + }, + "original": { + "owner": "ravitemer", + "ref": "v5.0.1", + "repo": "mcphub.nvim", + "type": "github" + } + }, "naersk": { "inputs": { "nixpkgs": "nixpkgs_2" @@ -667,14 +747,14 @@ }, "naersk_2": { "inputs": { - "nixpkgs": "nixpkgs_3" + "nixpkgs": "nixpkgs_4" }, "locked": { - "lastModified": 1721727458, - "narHash": "sha256-r/xppY958gmZ4oTfLiHN0ZGuQ+RSTijDblVgVLFi1mw=", + "lastModified": 1739824009, + "narHash": "sha256-fcNrCMUWVLMG3gKC5M9CBqVOAnJtyRvGPxptQFl5mVg=", "owner": "nix-community", "repo": "naersk", - "rev": "3fb418eaf352498f6b6c30592e3beb63df42ef11", + "rev": "e5130d37369bfa600144c2424270c96f0ef0e11d", "type": "github" }, "original": { @@ -685,7 +765,7 @@ }, "naersk_3": { "inputs": { - "nixpkgs": "nixpkgs_6" + "nixpkgs": "nixpkgs_7" }, "locked": { "lastModified": 1671096816, @@ -703,7 +783,7 @@ }, "naersk_4": { "inputs": { - "nixpkgs": "nixpkgs_7" + "nixpkgs": "nixpkgs_8" }, "locked": { "lastModified": 1698420672, @@ -721,7 +801,7 @@ }, "naersk_5": { "inputs": { - "nixpkgs": "nixpkgs_14" + "nixpkgs": "nixpkgs_16" }, "locked": { "lastModified": 1650101877, @@ -739,7 +819,7 @@ }, "naersk_6": { "inputs": { - "nixpkgs": "nixpkgs_15" + "nixpkgs": "nixpkgs_17" }, "locked": { "lastModified": 1721727458, @@ -758,11 +838,11 @@ "neogit-src": { "flake": false, "locked": { - "lastModified": 1728420708, - "narHash": "sha256-8tnWF7gmIzuXN4W/Z3Xy4ID6Y+lMU14UfrZdXYoYSXo=", + "lastModified": 1741986669, + "narHash": "sha256-4HLSTKNqngiFrRabffthYm3Zyfqr3IJCis9yhsH2Eps=", "owner": "NeogitOrg", "repo": "neogit", - "rev": "a8dd1509a7fc6bf92ca60f21e33393f685ab70aa", + "rev": "333968f8222fda475d3e4545a9b15fe9912ca26a", "type": "github" }, "original": { @@ -789,8 +869,8 @@ }, "neovim-flake": { "inputs": { - "flake-utils": "flake-utils_9", - "nixpkgs": "nixpkgs_10" + "flake-utils": "flake-utils_10", + "nixpkgs": "nixpkgs_12" }, "locked": { "dir": "contrib", @@ -811,8 +891,8 @@ }, "nil-flake": { "inputs": { - "flake-utils": "flake-utils_4", - "nixpkgs": "nixpkgs_4", + "flake-utils": "flake-utils_5", + "nixpkgs": "nixpkgs_5", "rust-overlay": "rust-overlay_2" }, "locked": { @@ -831,8 +911,8 @@ }, "nil-flake_2": { "inputs": { - "flake-utils": "flake-utils_10", - "nixpkgs": "nixpkgs_11", + "flake-utils": "flake-utils_11", + "nixpkgs": "nixpkgs_13", "rust-overlay": "rust-overlay_6" }, "locked": { @@ -882,6 +962,38 @@ } }, "nixpkgs_10": { + "locked": { + "lastModified": 1737557748, + "narHash": "sha256-BaMuhctP1x00+8cBE2cJveJQb70/tWHI50MHj/ZrtOY=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "606996d74f6e2a12635d41c1bf58bfc7ea3bb5ec", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_11": { + "locked": { + "lastModified": 1745377448, + "narHash": "sha256-jhZDfXVKdD7TSEGgzFJQvEEZ2K65UMiqW5YJ2aIqxMA=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "507b63021ada5fee621b6ca371c4fca9ca46f52c", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_12": { "locked": { "lastModified": 1715787315, "narHash": "sha256-cYApT0NXJfqBkKcci7D9Kr4CBYZKOQKDYA23q8XNuWg=", @@ -897,7 +1009,7 @@ "type": "github" } }, - "nixpkgs_11": { + "nixpkgs_13": { "locked": { "lastModified": 1690441914, "narHash": "sha256-Ac+kJQ5z9MDAMyzSc0i0zJDx2i3qi9NjlW5Lz285G/I=", @@ -913,7 +1025,7 @@ "type": "github" } }, - "nixpkgs_12": { + "nixpkgs_14": { "locked": { "lastModified": 1738579205, "narHash": "sha256-o6BeeanSUALvz8oL2CHOikVjCf7j+HqlA0WGvKOUX3Q=", @@ -929,7 +1041,7 @@ "type": "github" } }, - "nixpkgs_13": { + "nixpkgs_15": { "locked": { "lastModified": 1689850295, "narHash": "sha256-fUYf6WdQlhd2H+3aR8jST5dhFH1d0eE22aes8fNIfyk=", @@ -945,7 +1057,7 @@ "type": "github" } }, - "nixpkgs_14": { + "nixpkgs_16": { "locked": { "lastModified": 1650109093, "narHash": "sha256-tqlnKrAdJktRLXTou9le0oTqrYBAFpGscV5RADdpArU=", @@ -959,35 +1071,35 @@ "type": "indirect" } }, - "nixpkgs_15": { - "locked": { - "lastModified": 1729658218, - "narHash": "sha256-9Rg+AqLqvqqJniP/OQB3GtgXoAd8IlazsHp97va042Y=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "dfffb2e7a52d29a0ef8e21ec8a0f30487b227f1a", - "type": "github" - }, - "original": { - "id": "nixpkgs", - "type": "indirect" - } - }, - "nixpkgs_16": { - "locked": { - "lastModified": 1729658218, - "narHash": "sha256-9Rg+AqLqvqqJniP/OQB3GtgXoAd8IlazsHp97va042Y=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "dfffb2e7a52d29a0ef8e21ec8a0f30487b227f1a", - "type": "github" - }, - "original": { - "id": "nixpkgs", - "type": "indirect" - } - }, "nixpkgs_17": { + "locked": { + "lastModified": 1729658218, + "narHash": "sha256-9Rg+AqLqvqqJniP/OQB3GtgXoAd8IlazsHp97va042Y=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "dfffb2e7a52d29a0ef8e21ec8a0f30487b227f1a", + "type": "github" + }, + "original": { + "id": "nixpkgs", + "type": "indirect" + } + }, + "nixpkgs_18": { + "locked": { + "lastModified": 1729658218, + "narHash": "sha256-9Rg+AqLqvqqJniP/OQB3GtgXoAd8IlazsHp97va042Y=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "dfffb2e7a52d29a0ef8e21ec8a0f30487b227f1a", + "type": "github" + }, + "original": { + "id": "nixpkgs", + "type": "indirect" + } + }, + "nixpkgs_19": { "locked": { "lastModified": 1682109806, "narHash": "sha256-d9g7RKNShMLboTWwukM+RObDWWpHKaqTYXB48clBWXI=", @@ -1019,11 +1131,27 @@ }, "nixpkgs_3": { "locked": { - "lastModified": 1728538411, - "narHash": "sha256-f0SBJz1eZ2yOuKUr5CA9BHULGXVSn6miBuUWdTyhUhU=", + "lastModified": 1658285632, + "narHash": "sha256-zRS5S/hoeDGUbO+L95wXG9vJNwsSYcl93XiD0HQBXLk=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "b69de56fac8c2b6f8fd27f2eca01dcda8e0a4221", + "rev": "5342fc6fb59d0595d26883c3cadff16ce58e44f3", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "master", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_4": { + "locked": { + "lastModified": 1742738698, + "narHash": "sha256-KCtAXWwQs03JmEhP4ss59QVzT+rHZkhQO85KjNy8Crc=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "f3a2a0601e9669a6e38af25b46ce6c4563bcb6da", "type": "github" }, "original": { @@ -1031,7 +1159,7 @@ "type": "indirect" } }, - "nixpkgs_4": { + "nixpkgs_5": { "locked": { "lastModified": 1726481836, "narHash": "sha256-MWTBH4dd5zIz2iatDb8IkqSjIeFum9jAqkFxgHLdzO4=", @@ -1047,7 +1175,7 @@ "type": "github" } }, - "nixpkgs_5": { + "nixpkgs_6": { "locked": { "lastModified": 1708296515, "narHash": "sha256-FyF489fYNAUy7b6dkYV6rGPyzp+4tThhr80KNAaF/yY=", @@ -1063,7 +1191,7 @@ "type": "github" } }, - "nixpkgs_6": { + "nixpkgs_7": { "locked": { "lastModified": 1678724065, "narHash": "sha256-MjeRjunqfGTBGU401nxIjs7PC9PZZ1FBCZp/bRB3C2M=", @@ -1077,20 +1205,6 @@ "type": "indirect" } }, - "nixpkgs_7": { - "locked": { - "lastModified": 1708151420, - "narHash": "sha256-MGT/4aGCWQPQiu6COqJdCj9kSpLPiShgbwpbC38YXC8=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "6e2f00c83911461438301db0dba5281197fe4b3a", - "type": "github" - }, - "original": { - "id": "nixpkgs", - "type": "indirect" - } - }, "nixpkgs_8": { "locked": { "lastModified": 1708151420, @@ -1107,23 +1221,21 @@ }, "nixpkgs_9": { "locked": { - "lastModified": 1737557748, - "narHash": "sha256-BaMuhctP1x00+8cBE2cJveJQb70/tWHI50MHj/ZrtOY=", + "lastModified": 1708151420, + "narHash": "sha256-MGT/4aGCWQPQiu6COqJdCj9kSpLPiShgbwpbC38YXC8=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "606996d74f6e2a12635d41c1bf58bfc7ea3bb5ec", + "rev": "6e2f00c83911461438301db0dba5281197fe4b3a", "type": "github" }, "original": { - "owner": "NixOS", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" + "id": "nixpkgs", + "type": "indirect" } }, "nurl-flake": { "inputs": { - "nixpkgs": "nixpkgs_5" + "nixpkgs": "nixpkgs_6" }, "locked": { "lastModified": 1726505596, @@ -1141,7 +1253,7 @@ }, "nurl-flake_2": { "inputs": { - "nixpkgs": "nixpkgs_13" + "nixpkgs": "nixpkgs_15" }, "locked": { "lastModified": 1701273941, @@ -1168,10 +1280,11 @@ "harpoon-src": "harpoon-src", "heracles-flake": "heracles-flake", "jujutsu-flake": "jujutsu-flake", + "mcphub-flake": "mcphub-flake", "neogit-src": "neogit-src_2", "neovim-flake": "neovim-flake", "nil-flake": "nil-flake_2", - "nixpkgs": "nixpkgs_12", + "nixpkgs": "nixpkgs_14", "nixpkgs-darwin": "nixpkgs-darwin", "nurl-flake": "nurl-flake_2", "roslyn-lsp": "roslyn-lsp_2", @@ -1220,7 +1333,7 @@ "runwhen-flake": { "inputs": { "flake-compat": "flake-compat_4", - "flake-utils": "flake-utils_11", + "flake-utils": "flake-utils_12", "naersk": "naersk_5" }, "locked": { @@ -1262,7 +1375,7 @@ }, "rust-overlay-flake": { "inputs": { - "flake-utils": "flake-utils_12", + "flake-utils": "flake-utils_13", "nixpkgs": [ "nixpkgs" ] @@ -1311,11 +1424,11 @@ ] }, "locked": { - "lastModified": 1728461096, - "narHash": "sha256-cd0cXB85B3kGpm+iumP9xCnqFErspXL9Z/2X59kQ6c4=", + "lastModified": 1742351546, + "narHash": "sha256-GPubFcOXyi8TVm1xpltHYPcfGr+iO+if2u/EtzFVnHQ=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "e310b9bd71fa6c6a9fec0a8cf5af43ce798a0ad6", + "rev": "b0a7450168c62a46f87d204280e6d9d1c0292671", "type": "github" }, "original": { @@ -1327,7 +1440,7 @@ }, "rust-overlay_4": { "inputs": { - "flake-utils": "flake-utils_7", + "flake-utils": "flake-utils_8", "nixpkgs": [ "heracles-flake", "nixpkgs" @@ -1417,9 +1530,9 @@ }, "sheetsui-flake": { "inputs": { - "flake-utils": "flake-utils_13", + "flake-utils": "flake-utils_14", "naersk": "naersk_6", - "nixpkgs": "nixpkgs_16", + "nixpkgs": "nixpkgs_18", "rust-overlay": "rust-overlay_7" }, "locked": { @@ -1439,10 +1552,10 @@ "sile-flake": { "inputs": { "flake-compat": "flake-compat_5", - "flake-utils": "flake-utils_14", + "flake-utils": "flake-utils_15", "gitignore": "gitignore", "libtexpdf-src": "libtexpdf-src", - "nixpkgs": "nixpkgs_17" + "nixpkgs": "nixpkgs_19" }, "locked": { "lastModified": 1694595810, @@ -1518,6 +1631,21 @@ "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_2": { "locked": { "lastModified": 1681028828, @@ -1641,11 +1769,11 @@ "tree-sitter-cli-src": { "flake": false, "locked": { - "lastModified": 1728916102, - "narHash": "sha256-Aslud0Di5u3gaVHguEZPGkYwDJQPj6BACjo7+2wwfhE=", + "lastModified": 1742574818, + "narHash": "sha256-aV9tifiYFMAa2u+MkfJpm4TYUfmzajfsVc5jhs2ENzU=", "owner": "tree-sitter", "repo": "tree-sitter", - "rev": "fb23de926134188e2711bba2f7b589e3f25c14fd", + "rev": "e3db212b0b12a189010979b4c129a792009e8361", "type": "github" }, "original": { @@ -1705,16 +1833,33 @@ "victoria-logs-src": { "flake": false, "locked": { - "lastModified": 1728382879, - "narHash": "sha256-iaV4bjwjLqQcB//xIH16lRFry9ncxej+DLesb3pbm/4=", + "lastModified": 1742084154, + "narHash": "sha256-Oxy4MntciWUij83zyHixlEDa1DgeG/2ntNN+Nbw8xJg=", "owner": "VictoriaMetrics", "repo": "VictoriaMetrics", - "rev": "6878982c93e34a2bf6ab026b3809073b284b6afc", + "rev": "771233ebcd706578c44ed82047c714381a75ab5a", "type": "github" }, "original": { "owner": "VictoriaMetrics", - "ref": "v0.34.0-victorialogs", + "ref": "v1.17.0-victorialogs", + "repo": "VictoriaMetrics", + "type": "github" + } + }, + "victoria-metrics-src": { + "flake": false, + "locked": { + "lastModified": 1742560966, + "narHash": "sha256-iOeGz0qDeKMdafTDqI4/IMkXZ6KLdMDtFie3jwv2uvU=", + "owner": "VictoriaMetrics", + "repo": "VictoriaMetrics", + "rev": "e950846534ea594940a0f69845ef60a053c98ffd", + "type": "github" + }, + "original": { + "owner": "VictoriaMetrics", + "ref": "v1.114.0", "repo": "VictoriaMetrics", "type": "github" } diff --git a/nix/base-system/flake.nix b/nix/base-system/flake.nix index 662e1d3..bc0000e 100644 --- a/nix/base-system/flake.nix +++ b/nix/base-system/flake.nix @@ -63,6 +63,7 @@ flake = false; }; heracles-flake.url = "github:zaphar/Heracles"; + mcphub-flake.url = "github:ravitemer/mcphub.nvim/v5.0.1"; }; outputs = { @@ -82,17 +83,19 @@ neovim-flake, clio-flake, sheetsui-flake, + mcphub-flake, ... # We don't use the self or nixpkgs args here so we just glob it. }: rec { vimModule = system: let nil-pkg = nil-flake.packages."${system}".default; + mcp-hub-binary = custom-flakes.packages."${system}".mcp-hub; in { config, pkgs, ...}: let unstablePkgs = import unstable { inherit system; }; possession-nvim = pkgs.callPackage ./possession-nvim.nix { inherit (pkgs.vimUtils) buildVimPlugin; - inherit (pkgs) fetchFromGitHub; + inherit (pkgs) fetchFromGitHub; }; harpoon-nvim = pkgs.vimUtils.buildVimPlugin { pname = "harpoon"; @@ -116,10 +119,11 @@ # inherit (pkgs) fetchFromGitHub; #}; # TODO(jwall): When this actually builds we should use it. - #nvim-treesitter-powershell = pkgs.callPackage ./nvim-powershell.nix { - # inherit (pkgs.tree-sitter) buildGrammar; - # inherit (pkgs) fetchFromGitHub; - #}; + #nvim-treesitter-powershell = pkgs.callPackage ./nvim-powershell.nix { + # inherit (pkgs.tree-sitter) buildGrammar; + # inherit (pkgs) fetchFromGitHub; + #}; + mcphub-nvim = mcphub-flake.packages."${system}".default; in { imports = [ ./program-neovim.nix @@ -145,89 +149,90 @@ neovim.viAlias = true; neovim.package = pkgs.custom-neovim; neovim.configure = { - customRC = "lua << EOF + customRC = "lua << EOF ${builtins.readFile ./init.lua} EOF"; - packages.myVimPackage = { - start = (with pkgs.vimPlugins; [ - copilot-lua - avante-nvim - vim-sile - nvim-tree-lua - nvim-lspconfig - packer-nvim - vim-ps1 - vim-lsp - vim-vsnip - nvim-cmp - cmp-nvim-lua - cmp-nvim-lsp - cmp-vsnip - cmp-buffer - cmp-path - cmp-nvim-lsp-signature-help - nvim-dap # Debug Adapter Protocol support - #nvim-dap-ui - hoon-vim - nvim-treesitter - lualine-nvim - lualine-lsp-progress - lean-nvim - roslyn-nvim - ionide-nvim # Fsharp lsp support - nvim-treesitter-context - nvim-treesitter-textobjects - nvim-treesitter-parsers.ini - nvim-treesitter-parsers.ebnf - nvim-treesitter-parsers.rust - nvim-treesitter-parsers.c - #nvim-treesitter-parsers.c_sharp # currently broken for some reason - nvim-treesitter-parsers.cpp - nvim-treesitter-parsers.clojure - nvim-treesitter-parsers.latex - nvim-treesitter-parsers.terraform - nvim-treesitter-parsers.hcl - nvim-treesitter-parsers.yaml - nvim-treesitter-parsers.lua - nvim-treesitter-parsers.vim - nvim-treesitter-parsers.go - nvim-treesitter-parsers.toml - nvim-treesitter-parsers.tlaplus - nvim-treesitter-parsers.typescript - nvim-treesitter-parsers.starlark - nvim-treesitter-parsers.python - nvim-treesitter-parsers.sql - nvim-treesitter-parsers.javascript - nvim-treesitter-parsers.ocaml - nvim-treesitter-parsers.haskell - nvim-treesitter-parsers.css - nvim-treesitter-parsers.promql - nvim-treesitter-parsers.nix - nvim-treesitter-parsers.zig - nvim-treesitter-parsers.hoon - #omnisharp-extended-lsp-nvim - #neotest-dotnet - nix-develop-nvim - trouble-nvim - nightfox-nvim - melange-nvim - telescope-nvim - telescope-lsp-handlers-nvim - plenary-nvim - vim-dadbod - vim-dadbod-ui - vim-dadbod-completion - vim-dasht - direnv-vim - ]) ++ [ - possession-nvim - harpoon-nvim - d2-vim - hunk-nvim - neogit-nvim - # tree-sitter-csharp.neovim-plugin # Until nixpkgs updates their nvim-treesitter config the csharp queries will be broken - ]; - }; + packages.myVimPackage = { + start = (with pkgs.vimPlugins; [ + copilot-lua + avante-nvim + vim-sile + nvim-tree-lua + nvim-lspconfig + packer-nvim + vim-ps1 + vim-lsp + vim-vsnip + nvim-cmp + cmp-nvim-lua + cmp-nvim-lsp + cmp-vsnip + cmp-buffer + cmp-path + cmp-nvim-lsp-signature-help + nvim-dap # Debug Adapter Protocol support + #nvim-dap-ui + hoon-vim + nvim-treesitter + lualine-nvim + lualine-lsp-progress + lean-nvim + roslyn-nvim + ionide-nvim # Fsharp lsp support + nvim-treesitter-context + nvim-treesitter-textobjects + nvim-treesitter-parsers.ini + nvim-treesitter-parsers.ebnf + nvim-treesitter-parsers.rust + nvim-treesitter-parsers.c + #nvim-treesitter-parsers.c_sharp # currently broken for some reason + nvim-treesitter-parsers.cpp + nvim-treesitter-parsers.clojure + nvim-treesitter-parsers.latex + nvim-treesitter-parsers.terraform + nvim-treesitter-parsers.hcl + nvim-treesitter-parsers.yaml + nvim-treesitter-parsers.lua + nvim-treesitter-parsers.vim + nvim-treesitter-parsers.go + nvim-treesitter-parsers.toml + nvim-treesitter-parsers.tlaplus + nvim-treesitter-parsers.typescript + nvim-treesitter-parsers.starlark + nvim-treesitter-parsers.python + nvim-treesitter-parsers.sql + nvim-treesitter-parsers.javascript + nvim-treesitter-parsers.ocaml + nvim-treesitter-parsers.haskell + nvim-treesitter-parsers.css + nvim-treesitter-parsers.promql + nvim-treesitter-parsers.nix + nvim-treesitter-parsers.zig + nvim-treesitter-parsers.hoon + #omnisharp-extended-lsp-nvim + #neotest-dotnet + nix-develop-nvim + trouble-nvim + nightfox-nvim + melange-nvim + telescope-nvim + telescope-lsp-handlers-nvim + plenary-nvim + vim-dadbod + vim-dadbod-ui + vim-dadbod-completion + vim-dasht + direnv-vim + mcphub-nvim + ]) ++ [ + possession-nvim + harpoon-nvim + d2-vim + hunk-nvim + neogit-nvim + # tree-sitter-csharp.neovim-plugin # Until nixpkgs updates their nvim-treesitter config the csharp queries will be broken + ]; + }; }; }; environment.systemPackages = (with pkgs; [ @@ -238,13 +243,14 @@ EOF"; # TODO find a version of the julia package that will install # on darwin and add it as an overlay nil-pkg - lua-language-server + lua-language-server rust-analyzer dasht direnv lorri devenv unstablePkgs.fq + mcp-hub-binary ]); }; }; diff --git a/nix/base-system/init.lua b/nix/base-system/init.lua index 93e6479..5ab7ffe 100644 --- a/nix/base-system/init.lua +++ b/nix/base-system/init.lua @@ -17,6 +17,9 @@ vim.opt.tabstop = 4 vim.opt.shiftwidth = 4 --vim.opt.smarttab = false vim.opt.fileformats = "unix,dos" +-- Recommended by Avante docs +-- views can only be fully collapsed with the global statusline +vim.opt.laststatus = 3 vim.g.BASH_AuthorName = 'Jeremy Wall' vim.g.BASH_AuthorRef = 'jw' @@ -670,6 +673,23 @@ dap.configurations.cs = { }, } +local mcphub = require("mcphub") + +mcphub.setup({ + -- This sets vim.g.mcphub_auto_approve to false by default (can also be toggled from the HUB UI with `ga`) + config = vim.fn.expand("~/.config/mcphub/servers.json"), + auto_approve = false, + auto_toggle_mcp_servers = true, -- Let LLMs start and stop MCP servers automatically + extensions = { + avante = { + make_slash_commands = true, -- make /slash commands from MCP server prompts + } + }, + cmd = "mcp-hub"; +}) + +local hub_instance = mcphub.get_hub_instance(); + require('copilot').setup(); require('avante').setup ({ @@ -685,5 +705,21 @@ require('avante').setup ({ }, behavior = { enable_cursor_planning_mode = true, - } + }, + --system_prompt = hub_instance:get_active_servers_prompt(), + -- Using function prevents requiring mcphub before it's loaded + custom_tools = require("mcphub.extensions.avante").mcp_tool(), + -- Disable these because we'll use the mcphub versions instead + disabled_tools = { + "list_files", -- Built-in file operations + "search_files", + "read_file", + "create_file", + "rename_file", + "delete_file", + "create_dir", + "rename_dir", + "delete_dir", + "bash", -- Built-in terminal access + }, })