helix icon indicating copy to clipboard operation
helix copied to clipboard

NixOs helix grammars re-downloaded at every boot

Open niccogc opened this issue 5 months ago • 2 comments

Summary

Hi,

when I use helix from the flake, with the following config

      programs.helix = {
        enable = true;
        package = inputs.helix.packages.${pkgs.system}.default;
        languages = {
        ...

every time I reboot the system I get that all tree sitter grammars are unpacked into the git cache. This doesn't happens in consecutives rebuilds, but only when I rebuild after rebooted the system.

I have impermanence configured that wipes the root, maybe I should persist something to let helix know that the grammars are already built?

the result of health check

❯ hx --health           
Config file: /home/nicco/.config/helix/config.toml
Language file: /home/nicco/.config/helix/languages.toml
Log file: /home/nicco/.cache/helix/helix.log
Runtime directories: /home/nicco/.config/helix/runtime;/home/nicco/.local/share/helix/runtime;/nix/store/if7vfqp019rpvb2mi19qzqi87gg9fvna-helix-runtime;/nix/store/znhbggz6m673hnf4viqksh5q6zafwlz7-helix-term/bin/runtime
Runtime directory does not exist: /home/nicco/.config/helix/runtime
Runtime directory does not exist: /home/nicco/.local/share/helix/runtime
Runtime directory does not exist: /nix/store/znhbggz6m673hnf4viqksh5q6zafwlz7-helix-term/bin/runtime

and in the existing runtime folders on /grammars all the .so files are present

Thanks

Reproduction Steps

No response

Helix log

helix.log

Platform

Linux

Terminal Emulator

kitty

Installation Method

flake

Helix Version

helix 25.01.1 (f6878f62)

niccogc avatar Jun 10 '25 16:06 niccogc

Looks like a duplicate of https://github.com/helix-editor/helix/issues/13636?

I also use impermanence but I don't see the same behavior. I keep Helix installed via the profile though (nix profile install path/to/helix).

the-mikedavis avatar Jun 11 '25 13:06 the-mikedavis

Hi,

I read the issue but I dont think it is a duplicate, because after garbage collecting or rebooting the helix runtime still exists, and also the grammars folder is populated by the .so files. It happens only after reboot when i rebuild the sysyem that helix just unpack all the tree-sitter grammars 🤔 which takes around 4 minutes

niccogc avatar Jun 11 '25 16:06 niccogc

As an addition,

It seems the problem doesn t happen in installation but during the unpacking, to have a better idea of what happens if somebody has an idea on what I could check to debug.

As you can see there is an unpacking of all tree-sitter grammars

evaluating flake...
checking flake output 'overlaysSystem'...
warning: unknown flake output 'overlaysSystem'
checking flake output 'overlaysServer'...
warning: unknown flake output 'overlaysServer'
checking flake output 'devShells'...
copying path '/nix/store/a4wf74piifb6cpmkyisrzjcac62dvf9q-source' from 'https://cache.nixos.org'...
unpacking 'github:nix-community/home-manager/1db3cb415da14c[8](https://github.com/niccogc/nixos/actions/runs/15775004985/job/44467338965#step:5:9)1d8e0fdd3a5edeba82ad13a1f?narHash=sha256-6EVPi3XzioPzwxLZ/2nD6jbKCLA2ZXRdOWFgHg2ozrA%3D' into the Git cache...
unpacking 'github:nix-systems/default-linux/31732fcf5e8fea42e5[9](https://github.com/niccogc/nixos/actions/runs/15775004985/job/44467338965#step:5:10)c2488ad31a0e651500f68?narHash=sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80%3D' into the Git cache...
checking derivation devShells.x86_64-linux.default...
derivation evaluated to /nix/store/8filsjbyqwh5dhsc43j8f6h9bbfcjhlz-nix-shell.drv
checking flake output 'formatter'...
checking derivation formatter.x86_64-linux...
derivation evaluated to /nix/store/w8skpgf3f2aq6wqns8clm1q2dsz[10](https://github.com/niccogc/nixos/actions/runs/15775004985/job/44467338965#step:5:11)cwx-alejandra-4.0.0.drv
checking flake output 'common'...
warning: unknown flake output 'common'
checking flake output 'nixosConfigurations'...
checking NixOS configuration 'nixosConfigurations.bombolone'...
unpacking 'github:Mic92/sops-nix/50754dfaa0e24e313c626900d44ef431f3210138?narHash=sha256-VunQzfZFA%2BY6x3wYi2UE4DEQ8qKoAZZCnZPUlSoqC%2BA%3D' into the Git cache...
unpacking 'github:nix-community/disko/7f1857b31522062a6a00f88cbccf86b43acceed1?narHash=sha256-KrC9iOVYIn6ukpVlHbqSA4hYCZ6oDyJKrcLqv4c5v84%3D' into the Git cache...
unpacking 'github:nix-community/impermanence/4b3e914cdf97a5b536a889e939fb2fd2b043a170?narHash=sha256-LJggUHbpyeDvNagTUrdhe/pRVp4pnS6wVKALS782gRI%3D' into the Git cache...
unpacking 'github:nix-community/nixgl/310f8e49a149e4c9ea52f1adf70cdc768ec53f8a?narHash=sha256-lnzZQYG0%2BEXl/6NkGpyIz%2BFEOc/DSEG57AP1VsdeNrM%3D' into the Git cache...
unpacking 'github:numtide/flake-utils/c0e246b9b83f637f4681389ecabcb2681b4f3af0?narHash=sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc%3D' into the Git cache...
unpacking 'github:sodiboo/niri-flake/94ff8b2da333c42cad4a1429d897b99bd5b27e57?narHash=sha256-KfkA0uftsNhhIZAwnqzH6Z0TEn3wKKXhI5lYJCaL8x4%3D' into the Git cache...
unpacking 'github:sxyazi/yazi/a0ab614108e26181a9cb92010592331bea582284?narHash=sha256-sH0qWYJjm6gYAvsU7lvDRiGbsXBj6sI05ymc2F0tNYM%3D' into the Git cache...
unpacking 'github:numtide/flake-utils/[11](https://github.com/niccogc/nixos/actions/runs/15775004985/job/44467338965#step:5:12)707dc2f618dd54ca8739b309ec4fc024de578b?narHash=sha256-l0KFg5HjrsfsO/JpG%2Br7fRrqm[12](https://github.com/niccogc/nixos/actions/runs/15775004985/job/44467338965#step:5:13)kzFHyUHqHCVpMMbI%3D' into the Git cache...
unpacking 'github:nix-systems/default/da67096a3b9bf56a91d16901293e51ba5b49a27e?narHash=sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768%3D' into the Git cache...
unpacking 'github:oxalica/rust-overlay/0e624f2b1972a34be1a9b35290ed18ea4b419b6f?narHash=sha256-N4dwkRBmpOosa4gfFkFf/LTD8oOcNkAyvZ07JvRDEf0%3D' into the Git cache...
unpacking 'github:helix-editor/helix/fed3edcab70b31b416eb31c2ccf4a979c120d640?narHash=sha256-zgL6NHJsJ8r3HUsVfpXRGnO8tEN%2BS/SMKQ1zcAOGZac%3D' into the Git cache...
unpacking 'github:oxalica/rust-overlay/d342e8b5fd88421ff982f383c853f0fc78a847ab?narHash=sha256-3SdPQrZoa4odlScFDUHd4CUPQ/R1gtH4Mq9u8CBiK8M%3D' into the Git cache...
unpacking 'github:YaLTeR/niri/da3dc9[13](https://github.com/niccogc/nixos/actions/runs/15775004985/job/44467338965#step:5:14)a60062343a5a76b8745e55173a150751?narHash=sha256-7n5dzueAsq5jEZBWZ4TSM%2BydzKjPlcP0txBaevoGuqc%3D' into the Git cache...
unpacking 'github:briot/tree-sitter-ada/ba0894efa03beb70780156b91e28c716b7a4764d' into the Git cache...
unpacking 'github:adl-lang/tree-sitter-adl/2787d04beadfbe154d3f2da6e98dc45a1b134bbf' into the Git cache...
unpacking 'github:tree-sitter/tree-sitter-agda/c21c3a0f996363ed17b8ac99d827fe5a4821f217' into the Git cache...
unpacking 'github:mattsre/tree-sitter-alloy/3e18eb4e97f06c57a3925f3d20bef6329a6eaef3' into the Git cache...
unpacking 'github:amber-lang/tree-sitter-amber/c6df3ec2ec243ed76550c525e7ac3d9a10c6c8[14](https://github.com/niccogc/nixos/actions/runs/15775004985/job/44467338965#step:5:15)' into the Git cache...
unpacking 'github:virchau13/tree-sitter-astro/947e93089e60c66e681eba22283f4037841451e7' into the Git cache...
unpacking 'github:Beaglefoot/tree-sitter-awk/a799bc5da7c2a84bc9a06ba5f3540cf1191e4ee3' into the Git cache...
unpacking 'github:tree-sitter/tree-sitter-bash/487734f87fd87118028a65a4599352fa99c9cde8' into the Git cache...
unpacking 'github:vito/tree-sitter-bass/501133e260d768ed4e1fd7374912ed5c86d6fd90' into the Git cache...
unpacking 'github:polarmutex/tree-sitter-beancount/f3741a3a68ade59ec894ed84a64673494d2ba8f3' into the Git cache...
unpacking 'github:latex-lsp/tree-sitter-bibtex/ccfd77db0ed799b6c22c214fe9d2937f47bc8b34' into the Git cache...
unpacking 'github:tree-sitter-grammars/tree-sitter-bicep/0092c7d1bd6bb22ce0a6f78497d50ea2b87f19c0' into the Git cache...
unpacking 'github:tree-sitter-grammars/tree-sitter-bitbake/10bacac929ff36a1e8f4056503fe4f8717b21b94' into the Git cache...
unpacking 'github:EmranMR/tree-sitter-blade/4c66efe1e05c639c555ee70092021b8223d2f440' into the Git cache...
unpacking 'github:tree-sitter/tree-sitter-c/7175a6dd5fc1cee660dce6fe23f6043d75af424a' into the Git cache...
unpacking 'github:tree-sitter/tree-sitter-c-sharp/b5eb5742f6a7e9438bee22ce8026d6b927be2cd7' into the Git cache...
unpacking 'github:starkware-libs/tree-sitter-cairo/4c6a25680546761b80a710ead1dd34e76c203125' into the Git cache...
unpacking 'github:amaanq/tree-sitter-capnp/fc6e2addf103861b9b3dffb82c543eb6b71061aa' into the Git cache...
unpacking 'github:bufbuild/tree-sitter-cel/9f2b65da14c216df53933748e489db0f11121464' into the Git cache...
unpacking 'github:Decurity/tree-sitter-circom/02[15](https://github.com/niccogc/nixos/actions/runs/15775004985/job/44467338965#step:5:16)0524228b1e6afef96949f2d6b7cc0aaf999e' into the Git cache...
unpacking 'github:xlittlerag/tree-sitter-clarity/7fa54825fdd971a1a676f885384f024fe2b7384a' into the Git cache...
unpacking 'github:sogaiu/tree-sitter-clojure/e57c569ae332ca365da623712ae1f50f84daeae2' into the Git cache...
unpacking 'github:uyha/tree-sitter-cmake/6e51463ef3052dd3b328322c22172eda093727ad' into the Git cache...
unpacking 'github:stsewd/tree-sitter-comment/aefcc2813392eb6ffe509aa0fc8b4e9b57413ee1' into the Git cache...
unpacking 'github:fvacek/tree-sitter-cpon/0d01fcdae5a53191df5b1349f9bce053833270e7' into the Git cache...
unpacking 'github:tree-sitter/tree-sitter-cpp/56455f4245baf4ea4e0881c5[16](https://github.com/niccogc/nixos/actions/runs/15775004985/job/44467338965#step:5:17)9de69d7edd5ae7' into the Git cache...
unpacking 'github:tree-sitter/tree-sitter-css/769203d0f9abe1a9a691ac2b9fe4bb4397a73c51' into the Git cache...
unpacking 'github:weartist/rainbow-csv-tree-sitter/d3dbf9164461314[17](https://github.com/niccogc/nixos/actions/runs/15775004985/job/44467338965#step:5:18)e4c2ea9eb8591b23b466d27' into the Git cache...
unpacking 'github:eonpatapon/tree-sitter-cue/8a5f273bfa281c66354da562f2307c2d394b6c81' into the Git cache...
unpacking 'github:elliotfontaine/tree-sitter-cylc/30dd40d9bf23912e4aefa93eeb4c7090bda3d0f6' into the Git cache...
unpacking 'github:gdamore/tree-sitter-d/5566f8ce8fc24[18](https://github.com/niccogc/nixos/actions/runs/15775004985/job/44467338965#step:5:19)6fad06170bbb3c8d97c935d74' into the Git cache...
unpacking 'github:UserNobody14/tree-sitter-dart/e398400a0b785af3cf571f5a57eccab242f0cdf9' into the Git cache...
unpacking 'github:dynamotn/tree-sitter-dbml/2e2fa5640268c33c3d3f27f7e676f631a9c68fd9' into the Git cache...
unpacking 'github:joelspadin/tree-sitter-devicetree/877adbfa0174d25894c40fa75ad52d4515a36368' into the Git cache...
unpacking 'github:jbellerb/tree-sitter-dhall/affb6ee38d629c9296749767ab832d69bb0d9ea8' into the Git cache...
unpacking 'github:the-mikedavis/tree-sitter-diff/fd74c78fa88a20085dbc7bbeaba066f4d1692b63' into the Git cache...
unpacking 'github:treeman/tree-sitter-djot/67e6e23ba7be81a4373e0f49e21207bdc32d12a5' into the Git cache...
unpacking 'github:camdencheek/tree-sitter-dockerfile/087daa20438a6cc01fa5e6fe6906d77c869d[19](https://github.com/niccogc/nixos/actions/runs/15775004985/job/44467338965#step:5:20)fe' into the Git cache...
unpacking 'github:rydesun/tree-sitter-dot/917230743aa10f45a408fea2ddb54bbbf5fbe7b7' into the Git cache...
unpacking 'github:KMikeeU/tree-sitter-dtd/6116becb02a6b8e9588ef73d300a9ba4622e156f' into the Git cache...
unpacking 'github:rotmh/tree-sitter-dunstrc/9cb9d5cc51cf5e2a47bb2a0e2f2e519ff11c1431' into the Git cache...
unpacking 'github:glehmann/tree-sitter-earthfile/dbfb970a59cd87b628d087eb8e3fbe19c8e[20](https://github.com/niccogc/nixos/actions/runs/15775004985/job/44467338965#step:5:21)601' into the Git cache...
unpacking 'github:the-mikedavis/tree-sitter-edoc/74774af7b45dd9cefbf9510328fc6ff2374afc50' into the Git cache...
unpacking 'github:connorlay/tree-sitter-eex/f742f2fe327463335e8671a87c0b9b396905d1d1' into the Git cache...
unpacking 'github:Wilfred/tree-sitter-elisp/e5524fdccf8c22fc726474a910e4ade976dfc7bb' into the Git cache...
unpacking 'github:elixir-lang/tree-sitter-elixir/02a6f7fd4be28dd94ee4dd2ca19cb777053ea74e' into the Git cache...
unpacking 'github:elm-tooling/tree-sitter-elm/df4cb639c01b76bc9ac9cc66788709a6da20002c' into the Git cache...
unpacking 'github:ckafi/tree-sitter-elvish/e50787cadd3bc54f6d9c0704493a79078bb8a4e5' into the Git cache...
unpacking 'github:tree-sitter/tree-sitter-embedded-template/d[21](https://github.com/niccogc/nixos/actions/runs/15775004985/job/44467338965#step:5:22)df11b0ecc6fd211dbe11278e92ef67bd17e97' into the Git cache...
unpacking 'github:the-mikedavis/tree-sitter-erlang/33a3e4f1fa77a3e1a2736813f4b27c358f6c0b63' into the Git cache...```

niccogc avatar Jun 20 '25 08:06 niccogc

okay, I solved it by persisting the $HOME/.cache/nix folder

niccogc avatar Jun 30 '25 07:06 niccogc