Portable CLI configuration that works across NixOS, macOS, Linux distros, and containers.
# Clone the repo
git clone https://github.com/willgriffin/dotfiles.git ~/dotfiles
cd ~/dotfiles
# Run the installer
./install.shdotfiles/
├── zsh/ # Zsh configuration
│ └── .zshrc
├── bash/ # Bash configuration
│ └── .bashrc
├── nushell/ # Nushell configuration
│ └── .config/nushell/
│ ├── config.nu
│ └── env.nu
├── git/ # Git configuration
│ └── .gitconfig
└── starship/ # Starship prompt (optional)
└── .config/starship.toml
Uses GNU Stow to create symlinks:
./install.sh
# or manually:
stow zsh bash nushell gitThe NixOS config uses mkOutOfStoreSymlink to point to this dotfiles repo:
home.file.".zshrc".source = config.lib.file.mkOutOfStoreSymlink
"${config.home.homeDirectory}/dotfiles/zsh/.zshrc";This means:
- Edit files in
~/dotfiles/directly - Changes apply immediately (no
nixos-rebuildneeded for config tweaks) - Package installation still managed by Nix
For machine-specific customizations, create local override files:
~/.zshrc.local- Zsh overrides~/.bashrc.local- Bash overrides~/.gitconfig.local- Git overrides (signing keys, work email, etc.)~/.config/nushell/local.nu- Nushell overrides
These files are sourced at the end of the main configs.
| Feature | NixOS | macOS | Linux | Containers |
|---|---|---|---|---|
| Symlink method | mkOutOfStoreSymlink | stow | stow | stow |
| Package install | home-manager | brew/nix | apt/dnf | apk |
| Secrets | source-global-env | N/A | N/A | N/A |
| Rebuild alias | nixos-rebuild |
mac-rebuild |
nixos-rebuild |
N/A |
ll-ls -lla-ls -la..-cd .....-cd ../..
gs-git statusga-git addgc-git commitgp-git pushgl-git log --oneline --graph
repomix-npx repomixclaude-~/.claude/local/clauderebuild/update- Platform-specific rebuild command