Ship the omarchy-nvim plugin cache once
package() staged the LazyVim data tree twice: once at /usr/share/omarchy-nvim/data and again at /etc/skel/.local/share/nvim. Only the /etc/skel copy is ever read — new users are seeded from it, and omarchy-nvim-setup prefers it — so the /usr/share copy was dead weight worth close to half the package, which today is 243 MB installed and 178 MB read off the ISO on every install. That made omarchy-nvim the largest package in an Omarchy install after noto-fonts-cjk. Drop it once /etc/skel has its copy, after the chmod and worktree restore that copy inherits. config/ stays: both the Omarchy 4 remote-clipboard migration and the 3.x disable-news-alert migration read it from there. omarchy-nvim-setup's package-dir fallback narrows to config/ to match. It could never have fired for data anyway — the setup script and /etc/skel ship in the same package, so a new script can't pair with an old layout — and the remaining way to lose the seed, hand-clearing /etc/skel, now says which directory is missing and that pacman owns it. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
316f0b3b6c
commit
655b78764d
2 files changed
+12
-5
No files matched your search
@@ -1,6 +1,6 @@
|
||||
# Maintainer: Ryan Hughes <ryan@omarchy.org>
|
||||
pkgname=omarchy-nvim
|
||||
pkgver=2026.7.23
|
||||
pkgver=2026.7.27
|
||||
pkgrel=1
|
||||
pkgdesc="Pre-built LazyVim configuration with cached plugins"
|
||||
arch=('any')
|
||||
@@ -79,6 +79,12 @@ package() {
|
||||
ln -snf "../../../../.local/state/omarchy/current/theme/neovim.lua" \
|
||||
"$pkgdir/etc/skel/.config/nvim/lua/plugins/theme.lua"
|
||||
|
||||
# Ship the plugin cache once, now that /etc/skel has its copy. Keeping a
|
||||
# second one under /usr/share made omarchy-nvim the largest package in an
|
||||
# Omarchy install after noto-fonts-cjk — ~116 MiB installed, ~88 MB of it read
|
||||
# off the ISO on every install. config/ stays: migrations read it from there.
|
||||
rm -rf "$pkgdir/usr/share/$pkgname/data"
|
||||
|
||||
# Install setup/refresh commands to /usr/bin. setup fills missing pieces;
|
||||
# refresh explicitly backs up and overwrites with the same /etc/skel defaults
|
||||
# used for newly-created users.
|
||||
|
||||
@@ -49,14 +49,15 @@ EOF
|
||||
done
|
||||
|
||||
# Prefer /etc/skel so legacy setup/refresh uses the exact seed copied into new
|
||||
# users' homes. Fall back to the package share dir for older package layouts.
|
||||
if [[ ! -d "$CONFIG_SOURCE_DIR" || ! -d "$DATA_SOURCE_DIR" ]]; then
|
||||
# users' homes. Only the config tree still has a package-dir copy to fall back
|
||||
# on for older package layouts; the plugin cache ships once, in /etc/skel.
|
||||
if [[ ! -d "$CONFIG_SOURCE_DIR" ]]; then
|
||||
CONFIG_SOURCE_DIR="$PACKAGE_DIR/config"
|
||||
DATA_SOURCE_DIR="$PACKAGE_DIR/data"
|
||||
fi
|
||||
|
||||
if [[ ! -d "$CONFIG_SOURCE_DIR" || ! -d "$DATA_SOURCE_DIR" ]]; then
|
||||
echo "Error: omarchy-nvim defaults not found; is omarchy-nvim installed?" >&2
|
||||
echo "Error: omarchy-nvim defaults not found in $CONFIG_SOURCE_DIR / $DATA_SOURCE_DIR." >&2
|
||||
echo "The package owns both; restore them with: sudo pacman -S omarchy-nvim" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
Reference in new issue
Block a user