ayamir / nvimdots

A well configured and structured Neovim.
BSD 3-Clause "New" or "Revised" License
2.82k stars 451 forks source link

feat(nixos): add mergeLazyLock option #1310

Closed misumisumi closed 1 day ago

misumisumi commented 4 days ago

https://github.com/ayamir/nvimdots/pull/1260#issuecomment-2191929399

lazy-lock.json managed by nix/store is symbolically linked to ${XDG_CONFIG_DIR}/nvim/lazy-lock.json, but since it is read-only, there is a problem that it has low affinity with lazy.nvim. Therefore, lazy-lock.json is managed locally, and when lazy-lock.json in the repository is updated, it is merged to achieve both reproducibility and convenience.

It will be updated with the workflow shown below when home-manager activation.

  1. lazy-lock.json in the repository is managed as lazy-lock.fixed.json in /nix/store.
  2. When created symlink to ${XDG_CONFIG_DIR}/nvim, one of the following will be executed.
    1. Not existing lazy-lock.json under ${XDG_CONFIG_DIR}/nvim, copy to then.
    2. Existing lazy-lock.json under then, merge two json. At this time, merge to respect the package version of the repository.

This workflow will not run unless lazy-lock.json in the repository is updated (path to /nix/store is not updated) (i.e. not every activation of home-manager)

The traditional bindLazyLock options are also retained,

misumisumi commented 3 days ago

This workflow will not run unless lazy-lock.json in the repository is updated (path to /nix/store is not updated) (i.e. not every activation of home-manager)

Is this behavior okay? or do we try to merge every time you activate home-manager?

CharlesChiuGit commented 3 days ago

yeah, i think merging local lazy-lcok.json whenever the latest upstream lazy-lcok.json is pulled should be fine.

misumisumi commented 1 day ago

Do I merge this ?