Skip to content

Omarchy support: layer on Omarchy instead of replacing it - #35

Merged
CS-5 merged 5 commits into
mainfrom
omarchy-support
Nov 9, 2026
Merged

CS-5 merged 5 commits into
mainfrom
omarchy-support

Conversation

@CS-5

@CS-5 CS-5 commented Nov 9, 2026 •

Copy link
Copy Markdown
Owner

Supersedes #19, which was written for a ThinkPad on an older Omarchy. Rebuilt from main for Omarchy 4.5, which has changed enough to make several of its workarounds unnecessary.

On Omarchy (isOmarchy, from ID=omarchy in /etc/os-release)

The dotfiles layer on Omarchy instead of replacing it.

  • Updates and installs: update runs omarchy update -y, because Omarchy's libalpm hook aborts a direct pacman -Syu. install.sh uses omarchy pkg add and takes chezmoi from the Arch repos. clean leaves package pruning to omarchy update, which keeps two cached versions of each package as its rollback path.
  • Coding-agent CLIs: left to Omarchy's mise config wherever it declares them (omarchy-mise-default-tools declares). If you've opted out of Omarchy's default tools, the vendor installers run as before.
  • Shell: bash. .bashrc keeps Omarchy's structure (env-bootstrap above the interactivity guard, then its rc) and adds ours below it. fish isn't installed or applied.
  • Configs Omarchy owns there: ghostty, starship and herdr, because Omarchy themes and migrates them. herdr is also kept out of mise, since an Omarchy migration deletes mise copies of it.
  • Hyprland: only input.lua (Caps Lock as Escape, touchpad settings) and looknfeel.lua (gaps, rounding) are managed. They hold just the overrides on top of Omarchy's defaults, so its hash-guarded migrations never touch them.
  • Theme: the portland-head definition. When its colors change and it is the active theme, a script runs omarchy theme refresh; nothing selects the active theme. Claude Code uses custom:omarchy, so it follows whichever theme is active.
  • Packages: .chezmoidata/omarchy.toml lists packages, Omarchy installers and third-party shell plugins, installed on each apply when missing. Plugins are installed but not enabled, since shell.json stays per-machine. Failures only warn, and without a terminal for sudo the script says what it skipped.
  • Git: Omarchy's ~/.config/git/config is removed. Its useful defaults move into .gitconfig.

Every platform

  • mise pins moved to ~/.config/mise/conf.d/10-dotfiles.toml. mise use -g writes config.toml, whether you run it or Omarchy's agent wrapper falls back to it, so a managed config.toml would be reverted and rewritten on every apply. A modify_ template removes a config.toml that an older version of the dotfiles wrote (recognized by top-level settings that mise use -g never writes) and passes anything else through untouched.
  • Git defaults carried over from Omarchy: defaultBranch = main, push.autoSetupRemote, histogram diffs, branch/tag sorting, commit.verbose, rerere.autoupdate, and the co/br/ci/st aliases.
  • One abbreviation list in .chezmoidata/shell.toml, rendered as fish abbreviations and as bash/zsh aliases.
  • Per-machine overrides in ~/.config/local/: shell.sh, shell.fish, gitconfig and hypr.lua. Each is loaded last when present and never managed.
  • Bitwarden SSH agent everywhere except dev containers, WSL and Windows (previously work machines only). A headless box reaches it through a forwarded agent (ssh -A, VS Code Remote-SSH). Without Bitwarden or a forwarded agent, ssh falls back to key files on disk. fish starts its own ssh-agent only on WSL now.
  • Commit signing: always the "GitHub Signing" key held in Bitwarden, inlined in the git config and reached through an SSH agent; only Codespaces don't sign. The ~/.ssh/git_signing fallback and its generator are removed, so a machine that can't reach Bitwarden now fails to commit instead of committing unsigned. A box that commits while nobody is connected sets a box-only key or gpgSign = false in ~/.config/local/gitconfig (documented in the README).

Dropped from #19: the custom agents widget (Omarchy ships one now), the dotfiles-sync widget and menu, the ThinkPad keyboard-backlight and touchpad pieces, the rc.d/PowerShell restructuring, the managed shell.json, and the managed omazed hook (Omarchy's Zed installer creates that hook itself).

Upgrading existing machines

Run chezmoi update --init once on each machine (or chezmoi init --apply if update already pulled). The config generated from the old .chezmoi.toml.tmpl lacks isOmarchy, and chezmoi errors on missing keys, so a plain chezmoi update (including the update script deployed from main) stops at the apply. The new update passes --init itself, so later template changes don't need this. .chezmoiremove also deletes the retired ~/.config/fish/conf.d/claude.fish.

Testing

Nothing was applied to a real home directory.

  • Renders: every file and script rendered with an isolated HOME for Linux, Mac, WSL and dev container setups (personal and work) plus Omarchy, then diffed against main. Off Omarchy, the only changes are the abbreviations, the local-override hooks, the git defaults, the mise file move (same pins and settings), and update/clean. Work machines' SSH and LaunchAgent files are byte-identical to main.
  • Real chezmoi apply runs into sandboxes:
    • A copy of an Omarchy machine's current files, with --error-on-conflict: a second apply left nothing pending, and writes by mise use -g and Omarchy's theme hook don't show up as drift.
    • A machine upgrading from main: the old config.toml is retired cleanly.
  • Shells and Hyprland: the rendered .bashrc sourced in interactive and non-interactive bash against Omarchy's real rc. The Hyprland Lua loaded with a stubbed hl, including reloading ~/.config/local/hypr.lua after an edit, and every option name checked against the running Hyprland 0.56.2.
  • Scripts: update, install.sh and the package script run against stub commands for Omarchy (default tools on and opted out) and plain Linux. shellcheck reports nothing on the new and changed scripts.
  • Not tested: Windows and PowerShell (reviewed only), and fish (not installed here). PowerShell doesn't get the abbreviations: its built-in aliases (gc, gl, gp, mi…) take precedence over functions.

Follow-up

The "Review Dotfiles Dependencies" routine names root/private_dot_config/mise/config.toml.tmpl and needs to point at conf.d/10-dotfiles.toml.tmpl.

CS-5 added 5 commits November 9, 2026 10:02
Detect Omarchy (ID=omarchy in /etc/os-release, so false by construction
on WSL, dev containers, macOS and Windows) and defer to it wherever it
already owns something:

- update/install.sh go through `omarchy update -y` and `omarchy pkg add`
  (a libalpm hook aborts a direct `pacman -Syu`), take chezmoi from the
  Arch repos, keep bash as the shell, and leave the coding-agent CLIs
  that Omarchy's mise config declares to Omarchy. clean leaves package
  pruning to `omarchy update`, which keeps two cached versions per
  package as its rollback path.
- .bashrc keeps Omarchy's structure (env-bootstrap above the
  interactivity guard, then its rc) and adds ours below it.
- ghostty, starship and herdr configs are Omarchy's there; it themes
  them and migrates them. herdr is also kept out of mise there.
- Hyprland: manage only input.lua and looknfeel.lua, which hold just the
  overrides on top of Omarchy's defaults, so its hash-guarded migrations
  never contest them.
- portland-head theme definition, refreshed when its colors change and
  it is the active theme; nothing selects the active theme.
- .chezmoidata/omarchy.toml: packages, Omarchy installers and shell
  plugins, installed on every apply when missing; failures only warn.
- Claude Code follows the Omarchy theme (custom:omarchy).
- Omarchy's ~/.config/git/config is removed; its defaults move into
  .gitconfig on every platform, with defaultBranch = main.

Move the mise pins to conf.d/10-dotfiles.toml. `mise use -g` (yours, or
Omarchy's agent wrappers when its default tools are opted out) writes
config.toml, so a managed config.toml would be reverted and rewritten on
every apply. A modify_ template removes a config.toml an older version
of the dotfiles wrote and passes anything else through untouched.

Also, on every platform:

- One abbreviation list (.chezmoidata/shell.toml) rendered as fish
  abbreviations and bash/zsh aliases.
- ~/.config/local/{shell.sh,shell.fish,gitconfig,hypr.lua}: per-machine
  overrides, loaded last when present, never managed.
- Bitwarden is the SSH agent on work machines as before, and now also
  wherever its socket exists at `chezmoi init` time.
Drop the ~/.ssh/git_signing fallback and its generator: every machine
except Codespaces signs through an SSH agent holding the inlined key.
…indows

Signing now always goes through Bitwarden, so the agent follows: a
headless box reaches it through a forwarded agent, and fish starts its
own ssh-agent only on WSL.
….fish

chezmoi errors on data keys a stale config lacks, so update passes
--init. chezmoi leaves a target behind when its source is deleted, so
the old abbreviations file is listed in .chezmoiremove.
@CS-5
CS-5 merged commit cd95a3d into main Nov 9, 2026
@CS-5
CS-5 deleted the omarchy-support branch November 9, 2026 20:41
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