From 655b78764d53baf2b00064bff08ba1744d22a02a Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Mon, 27 Jul 2026 15:17:47 -0700 Subject: [PATCH] Ship the omarchy-nvim plugin cache once MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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) --- pkgbuilds/omarchy-nvim/PKGBUILD | 8 +++++++- pkgbuilds/omarchy-nvim/omarchy-nvim-setup | 9 +++++---- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/pkgbuilds/omarchy-nvim/PKGBUILD b/pkgbuilds/omarchy-nvim/PKGBUILD index 1c090715..56dfebc5 100644 --- a/pkgbuilds/omarchy-nvim/PKGBUILD +++ b/pkgbuilds/omarchy-nvim/PKGBUILD @@ -1,6 +1,6 @@ # Maintainer: Ryan Hughes 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. diff --git a/pkgbuilds/omarchy-nvim/omarchy-nvim-setup b/pkgbuilds/omarchy-nvim/omarchy-nvim-setup index f7e2d5ac..26d56fa5 100755 --- a/pkgbuilds/omarchy-nvim/omarchy-nvim-setup +++ b/pkgbuilds/omarchy-nvim/omarchy-nvim-setup @@ -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