Imported from MatiasOlivera/ubuntu-config (
AGENTS.md). Install upstream withnpx skills add MatiasOlivera/ubuntu-config. Copyright stays with the author.
ubuntu-config
Fresh-Ubuntu setup: bash scripts (setup/) + chezmoi dotfiles (dotfiles/). No lint, CI, or package manager. Scripts assume Ubuntu with apt + sudo.
New setup script contract (enforced by tests/test.sh)
- Single-purpose script defining one
install_*/config_*function. Plaininstall_*scripts need no guard;*config*.shmust run standalone viaif [[ ${BASH_SOURCE[0]} == "$0" ]]; then ... fi(seesetup/development/zsh/zsh-config.sh). - Wire it up:
sourceit and append its call insetup/install.sh(essentials → desktop-apps → development, then chezmoi apply) orsetup/post-install.sh(oh-my-zsh, fnm, antigravity; assumesinstall.shalready provided zsh/curl).test.shfails any library script not referenced by basename in one of them. - Keep it rerun-safe (guard repeated runs,
groupadd -f, overwrite apt sources — seesetup/development/docker.sh). - Declarative files → chezmoi in
dotfiles/(dot_*→$HOME,*.tmplrendered with~/.config/chezmoi/chezmoi.tomldata); imperative commands (chsh,gsettings, clones) → stay in bash. - Match the surrounding file's indentation (tabs vs spaces varies by file).
Commands
install.shtakes no args; non-interactive identity viaCHEZMOI_NAME/CHEZMOI_EMAIL, else it prompts once and stores~/.config/chezmoi/chezmoi.toml. Ends withchezmoi apply --source dotfiles/+tests/verify.sh.SKIP_UPGRADE=1 bash setup/post-install.shskipsapt upgrade(test VMs only; run full upgrade on real machines).- Static check (host-safe, zero-dep):
./tests/test.sh—bash -n+ sourced + source-only + standalone-guard checks, shellcheck only if installed. - Isolated static:
docker compose -f tests/compose.yml run --rm test(imageubuntu:26.04+ bash/shellcheck, repo mounted read-only). - Full e2e (needs Multipass on host):
./tests/test.sh --vm(fresh VM, non-interactiveCHEZMOI_*,SKIP_UPGRADE=1);--keep/--reuseonly valid with--vm. tests/verify.shis report-only, always exits 0, installs nothing; excludes manually installed apps (seesetup/manual-installation.md).
Secrets
Public repo: never commit secrets. Root .gitignore (commit deny-list) and dotfiles/.chezmoiignore (deploy deny-list) must stay in sync when adding dotfiles.
Commits
Atomic, conventional commits (feat:, fix:, docs:, refactor:, ...).