Warning
This repository performs privileged and destructive operations.
Running it can install software from remote sources, execute sudo darwin-rebuild switch --impure, change macOS defaults, change the login shell, rewrite /Applications and /Library/Input Methods, and remove files with rm -rf.
Review the code before running anything on a machine you care about.
Caution
Use this repository entirely at your own risk. I take no responsibility for data loss, broken machines, account issues, or any other damage caused by using it.
Personal macOS workstation configuration built with Nix, nix-darwin, and Home Manager.
It is intentionally opinionated and optimized for one machine owner, not for safe one-click onboarding by strangers.
- manages macOS system settings through
nix-darwin - manages the user environment through Home Manager
- installs CLI tools, editors, and selected GUI apps
- exposes selected Nix-managed apps into
/Applications - keeps machine-specific values in
machine/local.env, which is intentionally gitignored
-
Read docs/onboarding.md.
-
Generate the local machine override file:
./scripts/init-machine-config.sh
-
Review
machine/local.env. -
Bootstrap a fresh Mac:
./scripts/bootstrap-macos.sh
-
Re-apply changes on an already bootstrapped machine:
./scripts/apply.sh
-
Run a quick health check:
./scripts/doctor.sh
machine/local.envis local-only data. Do not commit it.machine/local.envaccepts only plain single-quotedORIGIN_*='...'assignments. Shell expressions are rejected.bootstrapandapplyevaluatepath:$PWD#workstation, so local uncommitted changes affect what gets applied.- Activation scripts replace managed app bundles under
/Applicationsand/Library/Input Methods. - Some cleanup helpers intentionally remove files, including app bundles that are considered unmanaged or unwanted on the target machine.
- flake.nix: flake entrypoint and package wiring
- machine/default.nix: machine model derived from
ORIGIN_*environment variables - modules/darwin/core.nix: macOS system settings and activation hooks
- modules/darwin/desktop-apps.nix:
/Applicationsand input-method exposure - home/default.nix: Home Manager entrypoint for the user environment
- scripts/: bootstrap, apply, doctor, and repo helper scripts
- docs/: onboarding, accounts, apps, workspace, and manual follow-up notes
- getting started with the stack: docs/.start.md
- machine bootstrap walkthrough: docs/onboarding.md
- account setup: docs/accounts.md
- app inventory: docs/apps.md
- workspace layout: docs/workspace.md
- manual follow-ups: docs/manual-steps.md
- optional app cleanup notes: docs/debloat.md