Skip to content

Make assimilate.sh cross-platform (macOS + Linux) - #12

Open
akan72 wants to merge 12 commits into
akan72/fix-ssh-signingfrom
feature/cross-platform-assimilate
Open

Make assimilate.sh cross-platform (macOS + Linux)#12
akan72 wants to merge 12 commits into
akan72/fix-ssh-signingfrom
feature/cross-platform-assimilate

Conversation

@akan72

@akan72 akan72 commented May 29, 2026

Copy link
Copy Markdown
Owner

Summary

Test Plan

  • Ran the complete installer in a fresh synthetic home on the Mac mini.
  • Simulated Linux x86_64 before and after this PR: Homebrew ran before, while the updated installer skipped Homebrew and created a regular .bashrc sourcing the repository config.
  • Ran bash -n assimilate.sh bashrc and zsh -n zshrc.
  • Screenshots: not applicable; validation was CLI-based.

@akan72
akan72 changed the base branch from main to akan72/fix-ssh-signing August 14, 2026 02:22
@akan72
akan72 force-pushed the feature/cross-platform-assimilate branch from 698f07a to 56bd4cf Compare August 22, 2026 19:28
akan72 added 12 commits August 22, 2026 15:30
Branches on `uname -s` to skip macOS-only steps on Linux:
- Skip hammerspoon/ghostty/vscode/zed symlinks and `brew bundle install`
- Source dotfiles bashrc from $HOME/.bashrc instead of symlinking (the EC2
  user_data appends a secrets block; symlinking would write into the repo)
- Pick delta tarball + SHA256 per OS/arch (Linux SHA marked TODO until first
  install on the EC2 box)
- Only run `nvim PackerSync` if nvim is on PATH

Enables running the install script on the EC2 dev box without breaking the
existing macOS flow.
lsd isn't installed on the EC2 dev box (no brew, dnf doesn't ship it),
and the dotfiles flow doesn't have a good place to install it cross-platform
without dragging in a several-minute cargo compile. Plain ls is fine.
Matches the same pattern nvm uses two lines above. Sourcing an absent file
errors out on shell startup, which is harmless on Mac (rust is installed)
but breaks the prompt on systems without rust.
AL2023 (and likely most non-Fedora Linuxes) don't have neovim in the
default package repos. macOS gets it from the Brewfile. Drops nvim into
$HOME/.local/bin so no root is needed. Placed above the PackerSync block
so the plugin sync that depends on `command -v nvim` actually fires.
v0.10.4 (my earlier guess) doesn't exist as a published release.
v0.9.5 is what's installed on the Mac, and v0.9.x predates the
asset-rename (still uses `nvim-linux64.tar.gz`), so the existing
extraction path stays correct.
zsh-autosuggestions, zsh-syntax-highlighting, and rust may be absent on
boxes where the Brewfile hasn't been applied (Linux dev box) or where
those brew packages aren't installed. Mirror the existing nvm/bun
pattern: source only when the file exists.
Without an argument, sourcing nvm.sh triggers nvm_auto use, which tries
to resolve a version (from .nvmrc or default-alias) and errors with
"N/A: version N/A -> N/A is not yet installed" when neither is set.
--no-use loads nvm without invoking auto-use; users still get the `nvm`
function and can `nvm use <version>` explicitly when they want one.
AL2023 on older/un-updated AMIs ships git 2.40, which lacks
`git clone --revision`. Use git init + fetch --depth 1 <sha> + checkout
instead, which pins the same single commit on any git version.
The cross-platform pass dropped the alias entirely so Linux boxes without
lsd keep a working ls, but that also removed it on macOS where lsd is
installed via the Brewfile. Guard on the binary instead.
@akan72
akan72 force-pushed the feature/cross-platform-assimilate branch from 56bd4cf to 58abadf Compare August 22, 2026 19:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant