feat: bake global gitignore (core.excludesFile) into image
Validate / base-change-warning (push) Successful in 6s
Validate / docs-check (push) Successful in 11s
Validate / validate-omos (push) Successful in 4m20s
Validate / validate-base (push) Successful in 14m0s

Seed ~/.gitignore_global from /etc/skel-devbox (seed-if-absent, like
.bash_aliases/.inputrc, so user edits survive recreate) and wire it via
git config --global core.excludesFile, guarded so a user-set excludesFile
is never overridden. Ignores *.bak, *.bak.*, *~, *.orig, *.swp, *.tmp
across all repos without per-repo .gitignore entries.
This commit is contained in:
pi
2026-06-28 11:52:02 +02:00
parent b9039f577e
commit 6639ba5820
4 changed files with 35 additions and 3 deletions
+14
View File
@@ -6,6 +6,20 @@ Tags follow **independent semver** (since `v2.0.0`) — they version *this image
--- ---
## Unreleased
### Added
- **Global gitignore baked into the image.** A `~/.gitignore_global`
(`*.bak`, `*.bak.*`, `*~`, `*.orig`, `*.swp`, `*.tmp`) is seeded into the home
dir from `/etc/skel-devbox/` on first boot (seed-if-absent, like
`.bash_aliases`/`.inputrc`, so user edits survive recreate) and wired via
`git config --global core.excludesFile`. Personal/tooling backup artifacts are
now ignored across all repos in the container without per-repo `.gitignore`
entries. The `core.excludesFile` wiring is skipped if the user already set one.
---
## v2.3.0 — 2026-06-25 ## v2.3.0 — 2026-06-25
Minor release. Adds an **image-baked fallback skills + harness-instruction** Minor release. Adds an **image-baked fallback skills + harness-instruction**
+1
View File
@@ -429,6 +429,7 @@ ENV PATH="/home/${USER_NAME}/.config/opencode/npm-global/bin:${PATH}"
RUN mkdir -p /etc/skel-devbox RUN mkdir -p /etc/skel-devbox
COPY rootfs/home/developer/.bash_aliases /etc/skel-devbox/.bash_aliases COPY rootfs/home/developer/.bash_aliases /etc/skel-devbox/.bash_aliases
COPY rootfs/home/developer/.inputrc /etc/skel-devbox/.inputrc COPY rootfs/home/developer/.inputrc /etc/skel-devbox/.inputrc
COPY rootfs/home/developer/.gitignore_global /etc/skel-devbox/.gitignore_global
# ── Entrypoint ──────────────────────────────────────────────────────── # ── Entrypoint ────────────────────────────────────────────────────────
COPY rootfs/usr/local/lib/opencode-devbox/ /usr/local/lib/opencode-devbox/ COPY rootfs/usr/local/lib/opencode-devbox/ /usr/local/lib/opencode-devbox/
+7 -1
View File
@@ -33,7 +33,7 @@ fi
# directly. # directly.
SKEL_DIR="/etc/skel-devbox" SKEL_DIR="/etc/skel-devbox"
if [ -d "$SKEL_DIR" ]; then if [ -d "$SKEL_DIR" ]; then
for f in .bash_aliases .inputrc; do for f in .bash_aliases .inputrc .gitignore_global; do
if [ -f "$SKEL_DIR/$f" ] && [ ! -e "$HOME/$f" ]; then if [ -f "$SKEL_DIR/$f" ] && [ ! -e "$HOME/$f" ]; then
cp "$SKEL_DIR/$f" "$HOME/$f" cp "$SKEL_DIR/$f" "$HOME/$f"
fi fi
@@ -92,6 +92,12 @@ fi
if [ -n "${GIT_USER_EMAIL:-}" ] && ! git config --global user.email &>/dev/null; then if [ -n "${GIT_USER_EMAIL:-}" ] && ! git config --global user.email &>/dev/null; then
git config --global user.email "$GIT_USER_EMAIL" git config --global user.email "$GIT_USER_EMAIL"
fi fi
# Global gitignore for personal/tooling artifacts (*.bak, *~, *.orig, ...).
# Seeded above into $HOME/.gitignore_global from /etc/skel-devbox. Point git at
# it only if the user has not already set their own core.excludesFile.
if [ -f "$HOME/.gitignore_global" ] && ! git config --global core.excludesFile &>/dev/null; then
git config --global core.excludesFile "$HOME/.gitignore_global"
fi
# ── Generate opencode config from env vars if no config mounted ────── # ── Generate opencode config from env vars if no config mounted ──────
# Delegated to a standalone Python script for clarity and testability. # Delegated to a standalone Python script for clarity and testability.
+11
View File
@@ -0,0 +1,11 @@
# Global gitignore — personal/tooling artifacts (applies to all repos in the container)
# Seeded into $HOME/.gitignore_global by entrypoint-user.sh and wired via
# `git config --global core.excludesFile`. Edit freely; it is yours after first boot.
# backup / editor / merge artifacts
*.bak
*.bak.*
*~
*.orig
*.swp
*.tmp