Capture omarchy-air's post-10-16 customizations into its layer
Everything on the Air that existed only on the machine: - git/config and mimeapps.list, which the omarchy-air-host branch captured but profiles never picked up. - NetBird: netbird-bin under [aur], the networkd drop-in it writes, and a setup.sh that runs `netbird service install` and enables the unit (the AUR package ships none). `netbird up` stays manual. - ufw rules beyond Omarchy's stock set and the handoff step's 4242 rule: ssh and the ocovo fabric (7746/udp) from the home LAN, 7746 over wt0, and 7790/tcp. base gains omarchy-fix-qt-color and a setup.sh that runs it. Qt 6.12's QtQuick Color singleton shadows the shell's qs.Commons Color, so the bar, lock screen and polkit dialog lose every colour; the fix renames the singleton to ShellColor. An omarchy upgrade restores the stock files, so it is idempotent, skips Qt < 6.12, and no-ops once upstream renames it. Verified: run against the pristine backup it reproduces the Air's hand-patched /usr/share/omarchy/shell byte for byte. Left out on purpose: ocovo-node.service (written by `ocovo service install`) and environment.d/ohv.conf belong to those projects. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Executable
+41
@@ -0,0 +1,41 @@
|
||||
#!/bin/bash
|
||||
# Qt 6.12 ships a QtQuick `Color` singleton that shadows the shell's own
|
||||
# qs.Commons `Color` palette, so every Color.bar.* / Color.polkit.* resolves to
|
||||
# undefined: the bar is a black strip with no widgets, and the lock screen and
|
||||
# polkit dialog lose their colours. Omarchy <= 4.0.4 still has the clash.
|
||||
#
|
||||
# The fix renames the shell's singleton to ShellColor and rewrites its users.
|
||||
# An omarchy package upgrade puts the stock files back, so this is idempotent
|
||||
# and safe to re-run after every update; it does nothing once upstream renames
|
||||
# the singleton itself.
|
||||
#
|
||||
# omarchy-fix-qt-color [--check] [shell-dir] (default /usr/share/omarchy/shell)
|
||||
set -euo pipefail
|
||||
|
||||
check=0
|
||||
[[ ${1-} == --check ]] && { check=1; shift; }
|
||||
shell=${1:-/usr/share/omarchy/shell}
|
||||
qmldir=$shell/Commons/qmldir
|
||||
|
||||
[[ -f $qmldir ]] || { echo "no $qmldir - not an Omarchy shell" >&2; exit 2; }
|
||||
if ! grep -q '^singleton Color ' "$qmldir"; then
|
||||
echo "= shell Color singleton not present (already renamed, or fixed upstream)"
|
||||
exit 0
|
||||
fi
|
||||
qt=$(pacman -Q qt6-declarative 2>/dev/null | awk '{print $2}') || true
|
||||
if [[ -n $qt ]] && [[ $(vercmp "$qt" 6.12) -lt 0 ]]; then
|
||||
echo "= qt6-declarative $qt predates the Color clash; nothing to do"
|
||||
exit 0
|
||||
fi
|
||||
(( check )) && { echo "! shell needs the Qt Color fix (qt6-declarative $qt)"; exit 1; }
|
||||
|
||||
sudo=(); [[ -w $qmldir ]] || sudo=(sudo)
|
||||
backup=$shell.bak-qt612
|
||||
[[ -e $backup ]] || "${sudo[@]}" cp -a "$shell" "$backup"
|
||||
|
||||
"${sudo[@]}" sed -i 's/^singleton Color /singleton ShellColor /' "$qmldir"
|
||||
find "$shell" -type f \( -name '*.qml' -o -name '*.js' \) -print0 \
|
||||
| xargs -0 grep -lZE '(^|[^A-Za-z0-9_."/])Color\.' \
|
||||
| xargs -0 -r "${sudo[@]}" sed -i -E 's/(^|[^A-Za-z0-9_."\/])Color\./\1ShellColor./g'
|
||||
echo "+ renamed the shell's Color singleton to ShellColor (backup: $backup)"
|
||||
echo " restart the shell to pick it up: omarchy-restart-shell"
|
||||
Executable
+20
@@ -0,0 +1,20 @@
|
||||
#!/bin/bash
|
||||
# base setup, run by install.sh's `setup` step after the files are in place.
|
||||
# Idempotent; honours OMARCHY_SETUP_DRY=1.
|
||||
set -uo pipefail
|
||||
|
||||
# Qt 6.12's QtQuick Color singleton blanks the bar (see bin/omarchy-fix-qt-color).
|
||||
# An omarchy upgrade restores the stock shell, so re-run install.sh's setup step,
|
||||
# or the script itself, after updating.
|
||||
fix=$OMARCHY_SETUP_LAYER/bin/omarchy-fix-qt-color
|
||||
if [[ ! -d /usr/share/omarchy/shell ]]; then
|
||||
echo " = no Omarchy shell; Qt Color fix not needed"
|
||||
elif "$fix" --check >/dev/null; then
|
||||
echo " = shell is clear of the Qt Color clash"
|
||||
elif [[ ${OMARCHY_SETUP_DRY:-0} == 1 ]]; then
|
||||
echo " ? would: $fix"
|
||||
elif "$fix" | sed 's/^/ /'; then
|
||||
pgrep -x quickshell >/dev/null && command -v omarchy-restart-shell >/dev/null && omarchy-restart-shell
|
||||
else
|
||||
echo " ! Qt Color fix failed; run $fix by hand"
|
||||
fi
|
||||
@@ -0,0 +1,39 @@
|
||||
# See https://git-scm.com/docs/git-config
|
||||
|
||||
[alias]
|
||||
co = checkout
|
||||
br = branch
|
||||
ci = commit
|
||||
st = status
|
||||
[init]
|
||||
defaultBranch = main
|
||||
[pull]
|
||||
rebase = true
|
||||
[push]
|
||||
autoSetupRemote = true # Automatically set upstream branch on push
|
||||
[diff]
|
||||
algorithm = histogram # Clearer diffs on moved/edited lines
|
||||
colorMoved = plain # Highlight moved blocks in diffs
|
||||
mnemonicPrefix = true # More intuitive refs in diff output
|
||||
[commit]
|
||||
verbose = true # Include diff comment in commit message template
|
||||
[column]
|
||||
ui = auto # Output in columns when possible
|
||||
[branch]
|
||||
sort = -committerdate # Sort branches by most recent commit first
|
||||
[tag]
|
||||
sort = -version:refname # Sort version numbers as you would expect
|
||||
[rerere]
|
||||
enabled = true # Record and reuse conflict resolutions
|
||||
autoupdate = true # Apply stored conflict resolutions automatically
|
||||
[user]
|
||||
name = Nic O'Connor
|
||||
email = nic.oconnor@gmail.com
|
||||
[fetch]
|
||||
prune = true
|
||||
[credential]
|
||||
helper = /usr/lib/git-core/git-credential-libsecret
|
||||
[credential "https://git.nic-oconnor.com"]
|
||||
helper =
|
||||
helper = "!f() { test \"$1\" = get && test -n \"${GITEA_KEY:-}\" && printf \"username=%s\\npassword=%s\\n\" \"${GITEA_USER:-$(id -un)}\" \"$GITEA_KEY\"; }; f"
|
||||
helper = /usr/lib/git-core/git-credential-libsecret
|
||||
@@ -0,0 +1,26 @@
|
||||
|
||||
[Default Applications]
|
||||
text/plain=nvim.desktop
|
||||
text/english=nvim.desktop
|
||||
text/x-makefile=nvim.desktop
|
||||
text/x-c++hdr=nvim.desktop
|
||||
text/x-c++src=nvim.desktop
|
||||
text/x-chdr=nvim.desktop
|
||||
text/x-csrc=nvim.desktop
|
||||
text/x-java=nvim.desktop
|
||||
text/x-moc=nvim.desktop
|
||||
text/x-pascal=nvim.desktop
|
||||
text/x-tcl=nvim.desktop
|
||||
text/x-tex=nvim.desktop
|
||||
application/x-shellscript=nvim.desktop
|
||||
text/x-c=nvim.desktop
|
||||
text/x-c++=nvim.desktop
|
||||
application/xml=nvim.desktop
|
||||
text/xml=nvim.desktop
|
||||
text/html=chromium.desktop
|
||||
x-scheme-handler/http=chromium.desktop
|
||||
x-scheme-handler/https=chromium.desktop
|
||||
x-scheme-handler/about=chromium.desktop
|
||||
x-scheme-handler/unknown=chromium.desktop
|
||||
x-scheme-handler/mailto=HEY.desktop
|
||||
x-scheme-handler/claude-cli=claude-code-url-handler.desktop
|
||||
@@ -23,6 +23,9 @@ openssh # sshd is enabled: the HP reaches it as `ssh air`
|
||||
obsidian-appimage # omarchy-aarch64
|
||||
wf-recorder # screen recording
|
||||
|
||||
[aur]
|
||||
netbird-bin # NetBird mesh client; setup.sh installs and enables its service
|
||||
|
||||
[optional]
|
||||
steam # asahi-alarm build, runs x86 games through FEX
|
||||
omarchy-steam-fex
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
# Captured as it is on 2026-10-16 (Omarchy 4.0.3rc4): no hand-built themes, no
|
||||
# shell plugins, stock bar, stock terminal fonts. Add personal-desktop to
|
||||
# include= to give it the HP's desktop.
|
||||
# 2026-11-01: plus git/config, mimeapps.list, NetBird and ufw rules (setup.sh).
|
||||
description="MacBook Air M2 (omarchy-air): Asahi, aarch64"
|
||||
include=(base personal features/handoff roles/developer roles/devops roles/ai-agents)
|
||||
hostnames=(omarchy-air)
|
||||
|
||||
Executable
+45
@@ -0,0 +1,45 @@
|
||||
#!/bin/bash
|
||||
# macbook-air-m2 setup, run by install.sh's `setup` step after the files are in
|
||||
# place. Everything here is state outside ~/.config. Idempotent; honours
|
||||
# OMARCHY_SETUP_DRY=1.
|
||||
set -uo pipefail
|
||||
|
||||
run() { if [[ ${OMARCHY_SETUP_DRY:-0} == 1 ]]; then echo " ? would: $*"; else "$@"; fi; }
|
||||
|
||||
# NetBird: the AUR package ships no unit; `netbird service install` writes
|
||||
# /etc/systemd/system/netbird.service. Joining the network (`netbird up`) is
|
||||
# interactive and stays a manual step.
|
||||
if command -v netbird >/dev/null; then
|
||||
if [[ -f /etc/systemd/system/netbird.service ]]; then
|
||||
echo " = netbird.service installed"
|
||||
else
|
||||
run sudo netbird service install && echo " + netbird.service"
|
||||
fi
|
||||
if systemctl is-enabled --quiet netbird 2>/dev/null; then
|
||||
echo " = netbird.service enabled"
|
||||
else
|
||||
run sudo systemctl enable --now netbird && echo " + netbird.service enabled (now run: netbird up)"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Firewall, beyond Omarchy's stock rules (LocalSend, Docker DNS) and the 4242
|
||||
# lan-mouse rule the handoff step opens per peer:
|
||||
# 22/tcp sshd, from the home LAN (the HP reaches it as `ssh air`)
|
||||
# 7746/udp ocovo fabric, from the home LAN and over NetBird (wt0)
|
||||
# 7790/tcp ocovo, anywhere
|
||||
ufw_rule() {
|
||||
if [[ ${OMARCHY_SETUP_DRY:-0} == 1 ]]; then echo " ? would: ufw $*"; return; fi
|
||||
# ufw reports "Skipping adding existing rule" for a duplicate, so this is idempotent.
|
||||
local out; out=$(sudo ufw "$@" 2>&1)
|
||||
[[ $out == *Skipping* ]] && echo " = ufw $*" || echo " + ufw $*"
|
||||
}
|
||||
if command -v ufw >/dev/null; then
|
||||
if [[ ${OMARCHY_SETUP_DRY:-0} != 1 ]] && ! sudo -n true 2>/dev/null && [[ ! -t 0 ]]; then
|
||||
echo " ! sudo needs a password and there is no terminal; ufw rules not applied"
|
||||
else
|
||||
ufw_rule allow from 192.168.1.0/24 to any port 22 proto tcp
|
||||
ufw_rule allow from 192.168.1.0/24 to any port 7746 proto udp comment 'ohv fabric'
|
||||
ufw_rule allow in on wt0 to any port 7746 proto udp
|
||||
ufw_rule allow 7790/tcp
|
||||
fi
|
||||
fi
|
||||
@@ -0,0 +1,6 @@
|
||||
# Created by NetBird to prevent systemd-networkd from removing
|
||||
# routes and policy rules managed by NetBird.
|
||||
|
||||
[Network]
|
||||
ManageForeignRoutes=no
|
||||
ManageForeignRoutingPolicyRules=no
|
||||
Reference in New Issue
Block a user