Repository navigation
Omarchy support: layer on Omarchy instead of replacing it - #35
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Supersedes #19, which was written for a ThinkPad on an older Omarchy. Rebuilt from
mainfor Omarchy 4.5, which has changed enough to make several of its workarounds unnecessary.On Omarchy (
isOmarchy, fromID=omarchyin/etc/os-release)The dotfiles layer on Omarchy instead of replacing it.
updaterunsomarchy update -y, because Omarchy's libalpm hook aborts a directpacman -Syu.install.shusesomarchy pkg addand takes chezmoi from the Arch repos.cleanleaves package pruning toomarchy update, which keeps two cached versions of each package as its rollback path.omarchy-mise-default-tools declares). If you've opted out of Omarchy's default tools, the vendor installers run as before..bashrckeeps Omarchy's structure (env-bootstrap above the interactivity guard, then its rc) and adds ours below it. fish isn't installed or applied.input.lua(Caps Lock as Escape, touchpad settings) andlooknfeel.lua(gaps, rounding) are managed. They hold just the overrides on top of Omarchy's defaults, so its hash-guarded migrations never touch them.omarchy theme refresh; nothing selects the active theme. Claude Code usescustom:omarchy, so it follows whichever theme is active..chezmoidata/omarchy.tomllists packages, Omarchy installers and third-party shell plugins, installed on each apply when missing. Plugins are installed but not enabled, sinceshell.jsonstays per-machine. Failures only warn, and without a terminal for sudo the script says what it skipped.~/.config/git/configis removed. Its useful defaults move into.gitconfig.Every platform
~/.config/mise/conf.d/10-dotfiles.toml.mise use -gwritesconfig.toml, whether you run it or Omarchy's agent wrapper falls back to it, so a managedconfig.tomlwould be reverted and rewritten on every apply. Amodify_template removes aconfig.tomlthat an older version of the dotfiles wrote (recognized by top-level settings thatmise use -gnever writes) and passes anything else through untouched.defaultBranch = main,push.autoSetupRemote, histogram diffs, branch/tag sorting,commit.verbose,rerere.autoupdate, and theco/br/ci/staliases..chezmoidata/shell.toml, rendered as fish abbreviations and as bash/zsh aliases.~/.config/local/:shell.sh,shell.fish,gitconfigandhypr.lua. Each is loaded last when present and never managed.ssh -A, VS Code Remote-SSH). Without Bitwarden or a forwarded agent, ssh falls back to key files on disk. fish starts its ownssh-agentonly on WSL now.~/.ssh/git_signingfallback 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 orgpgSign = falsein~/.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 --initonce on each machine (orchezmoi init --applyifupdatealready pulled). The config generated from the old.chezmoi.toml.tmpllacksisOmarchy, and chezmoi errors on missing keys, so a plainchezmoi update(including theupdatescript deployed frommain) stops at the apply. The newupdatepasses--inititself, so later template changes don't need this..chezmoiremovealso deletes the retired~/.config/fish/conf.d/claude.fish.Testing
Nothing was applied to a real home directory.
HOMEfor Linux, Mac, WSL and dev container setups (personal and work) plus Omarchy, then diffed againstmain. Off Omarchy, the only changes are the abbreviations, the local-override hooks, the git defaults, the mise file move (same pins and settings), andupdate/clean. Work machines' SSH and LaunchAgent files are byte-identical tomain.chezmoi applyruns into sandboxes:--error-on-conflict: a second apply left nothing pending, and writes bymise use -gand Omarchy's theme hook don't show up as drift.main: the oldconfig.tomlis retired cleanly..bashrcsourced in interactive and non-interactive bash against Omarchy's real rc. The Hyprland Lua loaded with a stubbedhl, including reloading~/.config/local/hypr.luaafter an edit, and every option name checked against the running Hyprland 0.56.2.update,install.shand 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.gc,gl,gp,mi…) take precedence over functions.Follow-up
The "Review Dotfiles Dependencies" routine names
root/private_dot_config/mise/config.toml.tmpland needs to point atconf.d/10-dotfiles.toml.tmpl.