From 8b85fa6a00fd0c922cdea6aa7835331ed7637274 Mon Sep 17 00:00:00 2001 From: "Thing-han, Lim" <15379156+potsrevennil@users.noreply.github.com> Date: Tue, 20 Oct 2026 13:51:42 +0800 Subject: [PATCH 1/4] fix(home): drop kapi-vim's global Haskell toolchain nixpkgs' haskell-language-server is dynamically linked against every Haskell library it uses, so its runtime closure is ~9 GiB (~1.5 GiB download, 727 paths incl. GHC and all -doc outputs). Every nixpkgs bump rehashes all of it, which made `make home` spend most of its time re-downloading and unpacking HLS. A global HLS is also the wrong shape: it must match each project's GHC. Leave enable_haskell at kapi-vim's default (off) and let Haskell projects provide ghc + HLS from their own flake devShell via direnv; kapi-vim's lspconfig only names `hls`, so it picks that up from PATH. Co-Authored-By: Claude Opus 5.5 --- users/home.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/users/home.nix b/users/home.nix index fd63049..a21dd96 100644 --- a/users/home.nix +++ b/users/home.nix @@ -30,8 +30,11 @@ inherit stateVersion; packages = builtins.attrValues { + # No enable_haskell (kapi-vim defaults it off): HLS must match each + # project's GHC, and nixpkgs' dynamically linked HLS drags a ~9 GiB + # closure that every nixpkgs bump re-downloads. Haskell projects + # provide ghc + HLS from their own flake devShell via direnv instead. kapi-vim = pkgs.kapi-vim.override { - enable_haskell = ! lite; enable_lean = ! lite; enable_typst = ! lite; enable_config = ! lite; From 0310d2364b4df1245b12cd767427bc3cfcd7ce51 Mon Sep 17 00:00:00 2001 From: "Thing-han, Lim" <15379156+potsrevennil@users.noreply.github.com> Date: Tue, 20 Oct 2026 14:07:40 +0800 Subject: [PATCH 2/4] refactor(home): only toggle kapi-vim's editor-wide tools Language toolchains (python, c, rust, go, js, haskell, lean) are no longer forced on: they stay at kapi-vim's defaults, which potsrevennil/kapi-vim#51 turns off so each project provides matching servers from its own flake devShell. Until that lands and the submodule is bumped, the old defaults keep python/c/rust/go/js on; haskell and lean are already off. Co-Authored-By: Claude Opus 5.5 --- users/home.nix | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/users/home.nix b/users/home.nix index a21dd96..c6c938a 100644 --- a/users/home.nix +++ b/users/home.nix @@ -30,20 +30,16 @@ inherit stateVersion; packages = builtins.attrValues { - # No enable_haskell (kapi-vim defaults it off): HLS must match each - # project's GHC, and nixpkgs' dynamically linked HLS drags a ~9 GiB - # closure that every nixpkgs bump re-downloads. Haskell projects - # provide ghc + HLS from their own flake devShell via direnv instead. + # Only the editor-wide toggles, and only to turn them off for lite. + # Language toolchains (python, c, rust, go, js, haskell, lean) stay at + # kapi-vim's default (off): each project brings its own matching + # servers from its flake devShell via direnv. Installing them globally + # was mostly redundant, and HLS alone is a ~9 GiB closure that every + # nixpkgs bump re-downloads. kapi-vim = pkgs.kapi-vim.override { - enable_lean = ! lite; - enable_typst = ! lite; enable_config = ! lite; - enable_python = ! lite; enable_shell = ! lite; - enable_c = ! lite; - enable_rust = ! lite; - enable_go = ! lite; - enable_js = ! lite; + enable_typst = ! lite; }; inherit (pkgs) From b6a0df50def4af74d1bd21b866ef7a096be21537 Mon Sep 17 00:00:00 2001 From: "Thing-han, Lim" <15379156+potsrevennil@users.noreply.github.com> Date: Tue, 20 Oct 2026 14:34:14 +0800 Subject: [PATCH 3/4] fix(home): keep kapi-vim's js toggle off for lite kapi-vim#51 keeps js (just nodejs) on by default, so it belongs with the editor-wide toggles that lite turns off, and out of the comment's list of toolchains left at an off default. Co-Authored-By: Claude Opus 5.5 --- users/home.nix | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/users/home.nix b/users/home.nix index c6c938a..a5d1571 100644 --- a/users/home.nix +++ b/users/home.nix @@ -31,15 +31,16 @@ packages = builtins.attrValues { # Only the editor-wide toggles, and only to turn them off for lite. - # Language toolchains (python, c, rust, go, js, haskell, lean) stay at + # Language toolchains (python, c, rust, go, haskell, lean) stay at # kapi-vim's default (off): each project brings its own matching - # servers from its flake devShell via direnv. Installing them globally - # was mostly redundant, and HLS alone is a ~9 GiB closure that every - # nixpkgs bump re-downloads. + # servers and formatters from its flake devShell via direnv. + # Installing them globally was mostly redundant, and HLS alone is a + # ~9 GiB closure that every nixpkgs bump re-downloads. kapi-vim = pkgs.kapi-vim.override { enable_config = ! lite; enable_shell = ! lite; enable_typst = ! lite; + enable_js = ! lite; }; inherit (pkgs) From 56db061def95e2c18ceb6f70311fed46eeeb9648 Mon Sep 17 00:00:00 2001 From: "Thing-han, Lim" <15379156+potsrevennil@users.noreply.github.com> Date: Tue, 20 Oct 2026 14:55:06 +0800 Subject: [PATCH 4/4] chore(kapi-vim): bump to project-scoped toolchains Picks up potsrevennil/kapi-vim#51 (per-language toolchains default off, come from each project's devShell) plus the already-merged #39-#46. Co-Authored-By: Claude Opus 5.5 --- flake.lock | 7 ++++--- users/home/kapi-vim | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/flake.lock b/flake.lock index 0634157..f54393d 100644 --- a/flake.lock +++ b/flake.lock @@ -93,9 +93,10 @@ ] }, "locked": { - "lastModified": 1783489711, - "narHash": "sha256-uIgvRdDIUAdr9kZN4eYfmJfywnSWvEgFehna9RvIByI=", - "rev": "aacd57b02b5f48adb036975ed6cf2d54798d9e7c", + "lastModified": 1792479124, + "narHash": "sha256-MQ2Jmw4Rok99SG0ePWtxQfj13lovzcuV322+9ofE8kY=", + "rev": "29896bfc4542456f91b2cd9ca2752725357ce72d", + "revCount": 295, "shallow": true, "type": "git", "url": "file:users/home/kapi-vim" diff --git a/users/home/kapi-vim b/users/home/kapi-vim index aacd57b..29896bf 160000 --- a/users/home/kapi-vim +++ b/users/home/kapi-vim @@ -1 +1 @@ -Subproject commit aacd57b02b5f48adb036975ed6cf2d54798d9e7c +Subproject commit 29896bfc4542456f91b2cd9ca2752725357ce72d