The dot product of two excellent config management solutions (chezmoi and
mise), plus a little extra scripting secret sauce; dotProd takes new Linux
machines from blank slates to Prod-ready.
Note
Large Language Models (Gemini and Claude) have been used extensively throughout this project (including to write the below README). I have read through all scripts/code, made edits where appropriate, and designed and guided the system from a high level. I actively use this system.
A fully modular, idempotent, and OS-aware system bootstrapping engine.
This repository manages system configuration and environment bootstrapping using Chezmoi and Mise. Rather than relying on a brittle, monolithic bash script, this setup uses a Data-Driven Dispatcher architecture. State is declared strictly in a TOML file, and execution is handled by isolated, universally portable template scripts.
The system is separated into four distinct domains to prevent permissions
conflicts, $PATH collisions, and cross-platform breakages.
- System Layer (
[system_tools]): * Handled by the native OS package manager (APT, DNF, Pacman).- Requires
sudo. Used strictly for kernel-level daemons (Tailscale), foundational packages (curl,git), and system-wide configurations.
- Requires
- Toolchain Layer (
[toolchains]): * Handled by custom isolated scripts (e.g.,rustup).- Bootstraps foundational compilers and runtimes into user-space before CLI applications are built.
- User-Space Layer (
[user_tools]): * Handled concurrently bymise.- Deploys CLI utilities (Zellij, Helix, Ripgrep) directly to
~/.local/share/mise/without requiring root access, ensuring total environment isolation.
- Deploys CLI utilities (Zellij, Helix, Ripgrep) directly to
- Desktop/GUI Layer (
[gui_apps]): * Handled primarily via Flatpak to prevent "Double Icon Syndrome" and OS-level package conflicts, with fallbacks for custom PPAs (e.g., Ghostty).
Chezmoi executes the bootstrapping pipeline in a strict numerical sequence,
guaranteeing dependencies are available exactly when needed. The scripts below
are all prefixed by run_[onchange_before/after] and suffixed by .sh[.tmpl].
01_install_system_tools: Dynamically detects the host OS, updates native package lists, and provisions root-level dependencies.02_install_user_tools: Installs compiler toolchains, bootstrapsmise, and provisions all user-space CLI tools concurrently. Before install, this script runs a pre-flight collision detection scan. If legacy binaries (e.g., anaptinstalled version of a toolmiseis trying to manage) are found in the$PATH, the pipeline halts to prevent environment corruption.03_install_gui_apps: Detects if a display server (Wayland/X11) is active. If true, configures Flathub and provisions desktop applications.90_integrations: (Run-After Phase) Executes glue logic, such as symlinking system-installed debuggers (LLDB) into the user paths expected by terminal editors. This script is currently not standardized and must be completely custom.
The entire state of the machine is driven by
~/.local/share/chezmoi/.chezmoidata.toml. You should rarely need to edit the
bash templates. To modify the system, simply update the TOML data:
[system_tools]
tailscale = "latest"
docker = "latest"
[toolchains]
rust = "stable"
[user_tools]
"cargo:zellij" = "zellij"
helix = "hx"
gh = "gh"
[gui_apps]
firefox = "org.mozilla.firefox"
ghostty = "ppa:mkasberg/ghostty-ubuntu"If a tool just needs a standard apt install or a mise binary pull, simply
add it to the appropriate section in .chezmoidata.toml. The dispatcher will
handle it automatically.
If a system tool or GUI app requires a custom PPA, a custom curl | sh
execution, or pre-installation cleanup:
- Add the tool to
.chezmoidata.toml. - Create an isolated bash script matching the tool's exact name in the hidden
.scriptsdirectory:- System Tools:
~/.local/share/chezmoi/.scripts/daemons/<tool_name>.sh - Toolchains:
~/.local/share/chezmoi/.scripts/toolchains/<tool_name>.sh - GUI Apps:
~/.local/share/chezmoi/.scripts/gui/<tool_name>.sh
- System Tools:
The dispatcher will automatically detect the script, execute it, and pass the
TOML value to it as $1.
To bootstrap a new machine from this repository:
sh -c "$(curl -fsLS get.chezmoi.io)" -- -b "$HOME/.local/bin" init --apply trlarsen/dotProd