Skip to content
shennarwpPublic

About

Multi-host bash configuration with per-host overrides and editor configs

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

dotfiles

Shared bash configuration for all managed hosts, with per-host overrides where needed.

Structure

merged/                 single source of truth — deployed to most hosts
├── .bashrc             fancy prompt, fastfetch banner, opencode/Go paths
├── .bash_aliases       union of all aliases (git, docker, fetch scripts, etc.)
├── .bash_functions     helper functions (most, vim, multitail, etc.)
├── .bash_profile       sources .profile
├── .profile            sources .bashrc, adds ~/bin and ~/.local/bin
├── .bash_logout        reset terminal on logout
└── .vimrc              line numbers, syntax, spaces-not-tabs

merged-qnap/            QNAP TS-219 (ARMv5, bash 3.2, no git/tput/hostid)
├── .bashrc             ANSI-only prompt (no jobs/screen blocks), neofetch banner
├── .bash_aliases_local QNAP busybox overrides (ls no --color, rm/mv/mkdir -i/-p, no uu)
├── .bash_functions     shared functions
└── .bash_logout        reset terminal on logout

merged-alpine/           Alpine 3.24 (no ncurses, apk-based)
└── .bash_aliases_local apk uu/uug/aai/aas overrides

merged-openwrt/          OpenWrt 18.06 MIPS (ash, busybox-only)
├── .bash_aliases       deliberately ash/busybox-compatible set (no GNU flags)
└── .profile            sources the openwrt aliases, pfetch banner, PATH

backlog/                 Backlog.md task board (one .md file per task)
├── config.yml          statuses, labels, priorities, DoD defaults
└── tasks/              the open work items

windows-terminal/       portable Windows Terminal settings (Monokai Remastered)
├── settings.json       sanitized, portable config (theme + fonts + profiles)
├── schemes/            extracted Monokai Remastered scheme + ANSI mapping
└── README.md           stock location, apply steps, font links

vscode/                 Windows VS Code config for remote development over WSL
├── settings.json       editor settings, theme, remote SSH config
├── wsl-ssh.bat         helper that proxies SSH calls through WSL
└── README.md           deploy instructions and notes

.githooks/pre-commit    tracked pre-commit hook -> tools/validate.sh --hook
tools/                  repo tooling
├── validate.sh         syntax, vimrc, drift, newlines, JSON, gitleaks
├── install-hooks.sh    install/uninstall the tracked hooks in .git/hooks
└── install-tools.sh    install gitleaks (and shellcheck, if apt)

.gitleaks.toml          secret-scan config (used by the pre-commit hook)
.gitattributes          LF everywhere, raycast exports marked binary
.gitignore              backups, logs, coverage/build output, OS cruft
deploy.sh               one-shot deploy to all hosts (probes OS, per-OS manifests)

Hosts

Host SSH alias OS Arch Notes
x270 (local) Debian 13 trixie (WSL) x86_64 dev machine, fastfetch 2.40.4-debug
m9 m9 Debian 12 bookworm x86_64 M900tiny
alp alp Debian 12 bookworm x86_64 alpinesky
rui rui Ubuntu 24.04 aarch64 ruipryux
fata fata Debian 11 bullseye x86_64 fastfetch polyfilled .deb
zot zot Debian 13 trixie x86_64 fastfetch 2.40.4-debug
qnap qnap QTS 4.3.3 (TS-219) armv5tel no tput/git/jobs, neofetch
alpine gpd Alpine 3.24 x86_64 requires apk add bash bash-completion ncurses fastfetch
openwrt omg OpenWrt 18.06 MIPS ash/busybox, pfetch, no fastfetch
zro zro (undocumented) — —

Deployment

Manual scp/rsync per host. Each host's dotfiles are installed to ~/ in the respective home:

  • Standard hosts (m9, alp, rui, fata, zot): copy merged/ files directly
  • Local x270: copy merged/ files to ~/
  • QNAP: copy merged-qnap/.bashrc + merged-qnap/.bash_functions + merged-qnap/.bash_logout + merged/.bash_aliases + merged-qnap/.bash_aliases_local
  • alpine: copy merged/ files + merged-alpine/.bash_aliases_local (apk overrides)
  • openwrt: copy merged-openwrt/.bash_aliases + merged-openwrt/.profile (its own ash-compatible set)

Connection details live in local ~/.ssh/config (only host alias names are referenced here). If that file is missing, deploy.sh says so and deploys to the local machine only. For a one-shot deploy across all hosts: ./deploy.sh (probes each host's OS remotely, picks the per-OS manifest, skips unreachable hosts with a summary). See ./deploy.sh --help.

Checks

tools/validate.sh              # syntax, vimrc, drift, newlines, JSON, gitleaks
tools/validate.sh --hook       # pre-commit subset (staged changes only)
tools/install-tools.sh         # install gitleaks (and shellcheck via apt)
tools/install-hooks.sh         # install the tracked hook into .git/hooks

merged-qnap/.bash_functions and merged-qnap/.bash_logout are synced copies of their merged/ originals; tools/validate.sh fails if they drift. After editing merged/.bash_functions (or .bash_logout), run:

cp merged/.bash_functions merged-qnap/.bash_functions
cp merged/.bash_logout    merged-qnap/.bash_logout

Secret scanning

The hook source is tracked in .githooks/pre-commit and installed with tools/install-hooks.sh (.git/hooks/ itself is not tracked). It runs tools/validate.sh --hook, whose gitleaks pass scans the staged diff:

gitleaks git --staged --config .gitleaks.toml   # what the hook runs
gitleaks git --config .gitleaks.toml            # full history (validate.sh)

gitleaks lives in ~/bin/gitleaks (installed by tools/install-tools.sh). Tracked files still contain some machine-specific data (a Wake-on-LAN MAC address, a Windows user path) — sanitizing them is tracked as TASK-5.

Bypass for one commit with git commit --no-verify.

Task tracking

Open work is tracked with Backlog.md. It is a local-only CLI (no server, no account, no telemetry) that keeps one Markdown file per task under backlog/tasks/, so the board is readable from any clone without the tool installed.

npm i -g backlog.md            # global install; nothing lands in the repo
backlog init "dotfiles"        # only needed on a fresh clone
backlog board                  # terminal kanban
backlog task list              # open tasks, grouped by priority
backlog task view TASK-2       # one task in full
backlog search "deploy"        # fuzzy search across tasks, docs, decisions
backlog browser                # local web UI on 127.0.0.1:6420
backlog config list            # show settings

Config lives in backlog/config.yml. Notable defaults set for this repo:

  • remote_operations: false — no git fetches, so the CLI works offline
  • auto_commit: false — task edits modify files but do not commit; the pre-commit hook and the normal PR flow still apply
  • definition_of_done — every new task gets "tools/validate.sh passes" and "PR opened against master, left unmerged"
  • labels: deploy, validate, prompt, privacy, ci, docs, tools, opencode, vscode

The npm package is named backlog.md. Bare npx backlog resolves to an unrelated third-party package, so always spell out the full name.

FIXME.md is now only a pointer to this board; it is kept so existing links do not go stale.

Legacy

Per-host folders (alpinesky/, m9/, ruipryux/, x270/, x270-cygwin/) were removed in September 2026 after consolidation into the merged set.

Aliases quick reference

Alias Command
uu system upgrade (apt/apk per host)
gl / glg / gpl / gplo git log helpers
dc / dco / dcip docker compose
nf / fh / uf neofetch / fastfetch / ufetch
spd Cloudflare 100 MB speed test (MB summary)
sb Sublime Text (WSL)
tq ~/torque

About

Multi-host bash configuration with per-host overrides and editor configs

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages