Personal Nix configuration supporting macOS (Darwin) and Linux systems with comprehensive dotfiles and development tools.
- Multi-platform support: macOS (Apple Silicon) and Linux
- Home Manager integration: Unified user environment configuration
- Development shell: Pre-configured environment with formatters and linters
- Shell & Terminal: Starship, Atuin, Zoxide, FZF
- Development: Git with Delta, GitHub CLI, Direnv, Mise
- Editors: Neovim with AstroNvim configuration
- Utilities: Bat, Yazi, JQ, Fonts configuration
- macOS specific: AeroSpace, Homebrew, Homerow
- Security: environment-aware 1Password and headless
ssh-agentSSH/Git signing configuration - Vault CLI: Bitwarden CLI enabled for
personaland available for other profiles
Install Nix using the Determinate installer (includes flakes support):
curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- installmacOS Notes: nix-homebrew manages Homebrew (no manual install required). masApps requires being signed into the App Store.
Install Xcode Command Line Tools (macOS):
xcode-select --installnixos-rebuild switch --flake '.#linux' --sudo# For Apple Silicon Macs (Work)
nix build '.#darwinConfigurations.work.system'
sudo ./result/sw/bin/darwin-rebuild switch --flake '.#work'
# For Apple Silicon Macs (Personal)
nix build '.#darwinConfigurations.personal.system'
sudo ./result/sw/bin/darwin-rebuild switch --flake '.#personal'
After switching, initialize dotfiles with Chezmoi:
chezmoi init songkg7 --applynix flake updatenix fmt .nix flake check
nix build '.#darwinConfigurations.work.system'
nix build '.#darwinConfigurations.personal.system'
nix eval '.#nixosConfigurations.linux.config.system.stateVersion' # Local fallback when not building Linux on a macOS hostnix develop
# Provides access to formatters, linters, and development tools├── flake.nix # Main entry point + profileConfig normalization
├── modules/
│ ├── shared/
│ │ ├── configuration.nix # Shared system-level imports
│ │ └── programs/ # Cross-platform Home Manager modules
│ ├── darwin/ # macOS-specific settings
│ └── linux/ # Linux-specific settings
├── libraries/
│ ├── home-manager/ # Shared Home Manager wiring via sharedModules
│ ├── nixpkgs/ # Overlays + package policy
│ └── dev-shell/ # Development environment
| Command | Description |
|---|---|
nix develop |
Enter development shell |
nix flake show |
Show available outputs |
nix flake check |
Validate configuration |
nix fmt . |
Format Nix files |
deadnix --edit |
Remove unused code |
- Import GPG keys and enable iCloud sync for secure key management
workkeeps1passwordand1password-clifor SSH agent and Git SSH signing.personalinstalls Bitwarden Desktop via Homebrew and enables the sharedprograms.bitwarden-climodule.personalkeeps Bitwarden as the password manager, but runtime SSH auth and Git SSH signing go through a local fixed-socketssh-agent.personalinteractive local zsh shells ensureSSH_AUTH_SOCKpoints at~/.ssh/agent.sockand lazily start the agent if the socket is stale or missing. SSH sessions keep any forwarded agent instead of overriding it.personalenablesAddKeysToAgent yesforgithub.com, so the first successful SSH auth can populate the fixed-socket agent automatically.ssh-personal-loadremains available as the explicitssh-add ~/.ssh/personal_github_ed25519helper after a fresh login or agent restart.tmuxsessions do not need TTY refresh hooks.- If you rotate to a new signing/authentication key, update
flake.nixandsecrets/allowed-signers.agetogether after GitHub authentication/signing keys have been updated. bwlogin,bwunlock,bwsync,bwlock, andbwlogoutare available wheneverprograms.bitwarden-cliis enabled.
This project is MIT Licensed.