docs(setup): add Debian 13 dev-VM setup procedure + scripts + devcontainer
CI / commits (pull_request) Successful in 2m52s
CI / check (pull_request) Successful in 3m3s
CI / scan (pull_request) Successful in 3m11s
CI / a11y (pull_request) Successful in 3m5s
Docs site / build (pull_request) Successful in 3m10s
CI / perf (pull_request) Successful in 6m53s

New procedure in docs/setup/01-dev-debian-vm-setup.md targeting the new
dev VM (10.100.201.21, Debian 13) that replaces the WSL workflow. The
existing setup files are renumbered (01->02, 02->03, 03->04) to free
prefix 01 for the default flow.

10 modular idempotent scripts under docs/setup/scripts/ install the
stack: zsh + Oh My Zsh + Powerlevel10k + plugins, modern CLI tooling
(bat, eza, fd-find, ripgrep, fzf, zoxide, ncdu, keychain + dev extras),
nvm + Node from .nvmrc + corepack + pnpm, Docker CE + compose plugin,
inotify watches + swap + hostname tuning, best-effort UFW + sshd
hardening that probes-before-applying, and notes/aliases.zsh +
notes/gitconfig.txt installation.

A systemd template (apf-portal-infra@.service) auto-starts the local
dev infra stack at boot per user.

.devcontainer/ ships a VSCode Dev Container spec pinning Node 24 and
attaching to the host's apf-portal-dev Compose network so postgres /
redis / otel resolve by DNS from inside the container. initializeCommand
fails fast if the infra hasn't been brought up yet.

CLAUDE.md Environment conventions documents the two envs (local +
development) plus the hybrid sub-mode (workstation IDE + VM infra via
SSH LocalForward) and the two IDE flows (Remote-SSH + Devcontainer).

Adjacent follow-ups (not in this PR): preview infra on the GitLab VM
(10.100.201.10), GitLab Runner migration alongside the Gitea -> GitLab
cutover, private dotfiles repo.
This commit is contained in:
Julien Gautier
2026-05-24 18:37:57 +02:00
parent 0d8b3712fb
commit f70b1d3a1b
19 changed files with 1236 additions and 22 deletions
+44
View File
@@ -0,0 +1,44 @@
#!/usr/bin/env bash
# Modern CLI tools — what notes/aliases.zsh assumes + a fullstack-dev kit.
set -euo pipefail
# shellcheck source=./lib.sh
source "$(cd "$(dirname "$0")" && pwd)/lib.sh"
require_debian
require_not_root
# Requested in the project brief.
apt_install bat eza fd-find ripgrep fzf zoxide ncdu keychain
# Useful extras for a fullstack dev workflow.
apt_install jq yq httpie make tree htop tmux direnv dnsutils unzip rsync
# Debian renames `bat`→`batcat` and `fd`→`fdfind` to avoid binary
# conflicts. notes/aliases.zsh aliases the Debian names back, but a
# direct binary on PATH is more robust (works for non-interactive
# scripts and other shells). Symlink in ~/.local/bin.
mkdir -p "$HOME/.local/bin"
for pair in "batcat:bat" "fdfind:fd"; do
src="${pair%%:*}"
dst="${pair##*:}"
src_path="$(command -v "$src" 2>/dev/null || true)"
if [[ -z "$src_path" ]]; then
warn "$src not found on PATH — skipping symlink."
continue
fi
if [[ -L "$HOME/.local/bin/$dst" && "$(readlink "$HOME/.local/bin/$dst")" == "$src_path" ]]; then
skip "$HOME/.local/bin/$dst already linked to $src."
elif [[ -e "$HOME/.local/bin/$dst" ]]; then
skip "$HOME/.local/bin/$dst exists (not a managed symlink) — leaving as-is."
else
ln -s "$src_path" "$HOME/.local/bin/$dst"
ok "Linked $HOME/.local/bin/$dst$src."
fi
done
# Make sure ~/.local/bin is on PATH for both bash and zsh.
for rcfile in "$HOME/.bashrc" "$HOME/.zshrc"; do
[[ -f "$rcfile" ]] || touch "$rcfile"
ensure_line 'export PATH="$HOME/.local/bin:$PATH"' "$rcfile"
done
ok "CLI tools installed."