{"id":15715906,"url":"https://github.com/jonathanxdr/dotfiles","last_synced_at":"2026-04-11T02:03:10.002Z","repository":{"id":210878148,"uuid":"680520231","full_name":"JonathanXDR/Dotfiles","owner":"JonathanXDR","description":"My dotfiles","archived":false,"fork":false,"pushed_at":"2025-03-07T17:27:40.000Z","size":141,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-29T10:51:52.681Z","etag":null,"topics":["bash","brew","git","npm","osx","zsh"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JonathanXDR.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-08-19T14:09:18.000Z","updated_at":"2025-03-07T17:27:44.000Z","dependencies_parsed_at":"2024-01-03T21:30:01.934Z","dependency_job_id":"e73903e0-63b2-4738-a1fd-63b4b9184f3c","html_url":"https://github.com/JonathanXDR/Dotfiles","commit_stats":null,"previous_names":["jonathanxdr/dotfiles"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JonathanXDR%2FDotfiles","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JonathanXDR%2FDotfiles/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JonathanXDR%2FDotfiles/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JonathanXDR%2FDotfiles/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JonathanXDR","download_url":"https://codeload.github.com/JonathanXDR/Dotfiles/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246372797,"owners_count":20766641,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bash","brew","git","npm","osx","zsh"],"created_at":"2024-10-03T21:43:24.281Z","updated_at":"2026-04-11T02:03:09.991Z","avatar_url":"https://github.com/JonathanXDR.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Dotfiles\n\n\u003e Opinionated macOS dotfiles managed by [chezmoi](https://chezmoi.io) in symlink mode: template-driven, keychain-backed, iCloud-synced, and idempotent from a clean install.\n\n## Features\n\n- **Symlink mode**: chezmoi symlinks rendered templates into `$HOME`, edits go straight to the source\n- **Secrets via macOS Keychain**: credentials injected at apply time via `keychain` template helper, never stored in the repo\n- **iCloud Drive as single source**: SSH keys, GPG keys, SSL certs, kubeconfig, and VPN config symlinked directly to iCloud; machine-type config via `config.toml`; keychain tokens backed up for bootstrap\n- **Machine-type aware**: `personal` vs `work` drives Brewfiles, proxy config, SSL bundles, and npm registries\n- **Auto-switching Node**: `.nvmrc` detection on every `cd` via zsh hook\n- **Proxy auto-detection**: event-driven LaunchAgent watches for network changes (Wi-Fi, VPN) and toggles proxy automatically\n- **Fast shell startup**: NVM lazy-loaded on first use, compinit cached for 24h, daily update gating for bun/nvm/pyenv/brew (~0.3s cold start)\n- **Machine-type-aware /etc/hosts**: chezmoi-rendered hosts template symlinked from `/etc/hosts`; work-only entries gated by machine type\n- **Shell functions**: proxy, VPN, Docker, secrets, Node, Git, system utilities\n- **Aliases**: navigation, git, kubernetes, macOS tweaks, editor shortcuts\n- **Idempotent setup scripts**: Homebrew, keychain import/export, npm globals, permissions\n\n## Prerequisites\n\n- macOS with Xcode Command Line Tools (`xcode-select --install`)\n- [chezmoi](https://chezmoi.io/install/) (`sh -c \"$(curl -fsLS get.chezmoi.io)\"`)\n- iCloud Drive signed in (for keys, config, and token backup)\n\n## Quick Start\n\n```bash\ngit clone git@github.com:JonathanXDR/Dotfiles.git ~/Developer/Git/GitHub/Dotfiles\n\nchezmoi init --source ~/Developer/Git/GitHub/Dotfiles --apply\n```\n\n`chezmoi init` prompts for your name, email, GPG key, and machine type. Machine-specific config (proxy, SSL, enterprise) is read automatically from `config.toml` on iCloud Drive. If the file is not found, chezmoi falls back to interactive prompts. After init, chezmoi automatically:\n\n1. Imports tokens from iCloud Drive into the macOS Keychain\n2. Installs Homebrew and all packages from the appropriate Brewfile\n3. Symlinks SSH, GPG, SSL, kube, and VPN directories to iCloud Drive\n4. Installs global npm packages\n5. Symlinks all shell config files into `$HOME`\n\n## Usage\n\n```bash\nchezmoi apply          # Apply changes to $HOME\nchezmoi diff           # Preview what would change\nchezmoi edit ~/.zshrc  # Edit via chezmoi (or edit directly: symlink mode)\n```\n\nShortcut aliases:\n\n| Alias    | Command                   |\n| -------- | ------------------------- |\n| `es`     | `chezmoi edit ~/.zshrc`   |\n| `ev`     | `chezmoi edit ~/.exports` |\n| `reload` | Reload shell              |\n\n## Managing Secrets\n\nSecrets are stored in the macOS login keychain and backed up to iCloud Drive.\n\n```bash\nsecret:set \u003cservice\u003e \u003caccount\u003e    # Add/update (prompts for password)\nsecret:get \u003cservice\u003e \u003caccount\u003e    # Read from keychain\nsecret:remove \u003cservice\u003e \u003caccount\u003e # Remove from keychain + iCloud\nsecret:list                       # List all managed secrets\n```\n\nAfter updating a secret, run `chezmoi apply` to re-render templates with the new value.\n\n## Shell Loading Order\n\n```text\n~/.exports ─────────── env vars, proxy, locale, history, zsh options\n        │\n~/.functions ───────── utility functions\n        │\nPATH setup ─────────── Homebrew, pyenv, RVM, Bun, ...; NVM lazy-loaded on first use\n        │\n~/.aliases ─────────── command aliases\n        │\n~/.completions ─────── zsh plugins, autosuggestions, syntax highlighting\n        │\nRuntime hooks ──────── nvmrc auto-switch, proxy state load, SSH agent, SDKMAN\n```\n\n## Project Structure\n\n```text\n.chezmoidata.toml             Shared non-secret defaults\n.chezmoi.toml.tmpl            User config (iCloud config.toml or prompts)\n.chezmoitemplates/            keychain helper + bash helpers for scripts\n.chezmoiscripts/              Numbered setup scripts\n\nsymlink_dot_ssh.tmpl          ~/.ssh → iCloud\nsymlink_dot_ssl.tmpl          ~/.ssl → iCloud (work only, via .chezmoiignore)\nsymlink_dot_vpn.tmpl          ~/.vpn → iCloud (work only, via .chezmoiignore)\nprivate_dot_gnupg/            ~/.gnupg files → iCloud (6 symlinks)\nprivate_dot_kube/             ~/.kube/config → iCloud\n\ndot_local/bin/                ~/.local/bin/ scripts\n  executable_proxy-watchd.tmpl  Proxy state daemon (work only)\nLibrary/LaunchAgents/         ~/Library/LaunchAgents/\n  local.proxy-watchd.plist.tmpl  Network-change watcher (work only)\n\ndot_zshrc                     Shell orchestrator\ndot_exports.tmpl              Env vars, history, zsh options (templated)\ndot_functions                 Shell functions\ndot_aliases                   Command aliases\ndot_completions               Zsh completions \u0026 plugins\n\ndot_gitconfig.tmpl            Git user, GPG signing, LFS\ndot_gitignore_global          Global gitignore\ndot_npmrc.tmpl                npm registry tokens (from keychain)\ndot_npm.globals               Global npm packages list\ndot_wakatime.cfg.tmpl         WakaTime API key (from keychain)\ndot_config/zed/               Zed editor settings (from keychain)\ndot_config/hosts.tmpl         Machine-type-aware /etc/hosts (rendered, symlinked from /etc/hosts)\nLibrary/.../Code/User/        VS Code settings \u0026 keybindings\n\nBrewfile.personal             Homebrew packages (personal)\nBrewfile.swisscom             Homebrew packages (work)\n```\n\n## Architecture\n\nSee **[ARCHITECTURE.md](./ARCHITECTURE.md)** for a detailed walkthrough of how the system is organized, how data flows, design decisions, and where to start when navigating the codebase.\n\n## Contributing\n\nThis is a personal dotfiles repo. Feel free to fork and adapt for your own setup.\n\nIf you spot a bug or have a suggestion, [open an issue](https://github.com/JonathanXDR/Dotfiles/issues).\n\n## License\n\n[MIT](./LICENSE) \u0026copy; Jonathan Russ\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonathanxdr%2Fdotfiles","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjonathanxdr%2Fdotfiles","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonathanxdr%2Fdotfiles/lists"}