Update username#21
Conversation
There was a problem hiding this comment.
Thanks for taking an interest in these dotfiles.
This repo is public so you can read it, learn from it, and fork it freely, but it is Kun's personal setup and does not accept pull requests or feature requests.
If you want to adapt something, please fork the repo and make it yours.
If you found a bug, please open a bug report issue instead of sending a patch.
Pull requests are auto-closed here so the repo can stay personal and predictable.
There was a problem hiding this comment.
Pull request overview
This PR updates the dotfiles setup to avoid per-machine username edits by deriving the user from the environment (requiring --impure), and refreshes several personal config files and tool selections to match the updated workflow.
Changes:
- Derive the macOS username from
SUDO_USER/USERinflake.nixand pass--impurethrough bootstrap/rebuild workflows. - Add a new flake input (
treehouse) and a packaged prebuilt binary (no-mistakes) to the Home Manager package set. - Update documentation and various user configs (WezTerm, herdr, Claude settings, issue template links).
Reviewed changes
Copilot reviewed 11 out of 12 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
rebuild.sh |
Adds --impure to support env-derived username evaluation. |
bootstrap.sh |
Removes username rewrite step; adds --impure to first switch. |
flake.nix |
Reads username from environment; adds treehouse input; passes inputs to Home Manager. |
flake.lock |
Locks the new treehouse flake input. |
home.nix |
Adds no-mistakes derivation and installs treehouse + new shell aliases. |
configuration.nix |
Enables Homebrew auto-migration and expands brew/cask lists. |
README.md |
Updates clone URL and docs for the new --impure / env-username workflow. |
home/AGENTS.md |
Updates agent instructions content and headings. |
home/.config/wezterm/wezterm.lua |
Changes color scheme and background opacity. |
home/.config/herdr/config.toml |
Disables onboarding. |
home/.claude/settings.json |
Adds dangerous-mode skip flag and a SessionStart hook. |
.github/ISSUE_TEMPLATE/config.yml |
Updates fork URL in contact link. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| - **Username**: nothing to change. | ||
| `flake.nix` reads your macOS username from the environment at build time (`SUDO_USER` under sudo, `USER` otherwise), so the same branch works on any machine. | ||
| Everything else (`configuration.nix`, `home.nix`, home directory paths) is threaded from that one variable. | ||
| - **Host label** `"mac"`, in three places: `flake.nix` (the `darwinConfigurations."mac"` name), `rebuild.sh:5` (the `#mac` at the end of the flake reference), and `bootstrap.sh`'s first-switch command (also `#mac`). |
| "command": "input=$(cat); model=$(echo \"$input\" | jq -r '.model.display_name'); used=$(echo \"$input\" | jq -r '.context_window.used_percentage // empty'); if [ -n \"$used\" ]; then printf \"%s | ctx: %.0f%% used\" \"$model\" \"$used\"; else printf \"%s\" \"$model\"; fi" | ||
| }, | ||
| "theme": "dark-ansi", | ||
| "skipDangerousModePermissionPrompt": true, |
| "hooks": [ | ||
| { | ||
| "type": "command", | ||
| "command": "gh-axi", |
|
|
||
| # no-mistakes: git-push validation proxy. No upstream flake, so install the | ||
| # signed prebuilt release binary directly. This keeps it in the Nix profile via | ||
| # rebuild — no curl installer, nothing in /usr/local, no sudo beyond darwin-rebuild. |
| dontConfigure = true; | ||
| dontBuild = true; | ||
| dontFixup = true; # skip ALL Mach-O post-processing (strip/re-sign); keeps the upstream | ||
| # Developer ID + hardened-runtime signature valid — arm64 kills a |
Thanks for the interest
Thanks for taking an interest in these dotfiles.
This repo is public so you can read it, learn from it, and fork it freely, but it is Kun's personal setup and does not accept pull requests or feature requests.
If you want to adapt something, please fork the repo and make it yours.
If you found a bug, please open a bug report issue instead of sending a patch.
Pull requests are auto-closed here so the repo can stay personal and predictable.