This repository defines a complete macOS development environment using:
nix-darwinfor system-level configurationhome-managerfor user-level tools and shell/editor setupsops-nixfor encrypted secrets- a modular Neovim config powered by
lazy.nvim
It is currently tailored for an Apple Silicon Mac and a single user (waseemakram), but it is straightforward to adapt.
- macOS defaults (Dock, Finder, keyboard repeat, Touch ID for
sudo) - Homebrew taps/brews/casks and App Store apps
- CLI tools (
gh,bun,uv,tmux,ripgrep,fd, etc.) - Shell tooling (
zsh,oh-my-zsh,fzf,zoxide,atuin,starship) - Tmux and Lazygit configuration
- AeroSpace window manager config
- Opencode configuration and MCP providers (Exa + Context7)
- Neovim setup with LSP, Telescope, Treesitter, Git, AI, DAP/testing plugins
flake.nix- flake inputs/outputs anddarwinConfigurationsdarwin.nix- system packages and macOS/nix-darwin optionshome.nix- user packages, shell/session vars, Home Manager programshome/*.nix- modular program configs (zsh,tmux,starship, etc.)secrets.yaml- encrypted secrets consumed bysops-nix.sops.yaml- SOPS creation rules (Age recipients)nvim/- Neovim configuration (Lua modules + plugin specs)
- macOS (Apple Silicon recommended; this config targets
aarch64-darwin) - Nix
- nix-darwin
- Homebrew (enabled and managed by nix-darwin)
- SOPS + age
This repo assumes the path ~/dotfiles in a few places (for example, Neovim is linked from ${homeDir}/dotfiles/nvim).
git clone https://github.com/devwaseem/dotfiles ~/dotfiles
cd ~/dotfilesBefore applying, update these values to match your machine/user:
flake.nixdarwinConfigurations."Waseems-MacBook-Air"users.users.waseemakram.home
darwin.nixuser = "waseemakram";
home.nixusername = "waseemakram";
This repo expects these secret keys in secrets.yaml:
exa_api_keycontext7_api_keybw_session
Generate/import an Age key, then either:
- replace the recipient in
.sops.yaml, or - add your recipient and re-encrypt
secrets.yaml.
Example workflow:
mkdir -p ~/.config/sops/age
age-keygen -o ~/.config/sops/age/keys.txt
# edit .sops.yaml recipient(s), then edit secrets
sops secrets.yamlsudo darwin-rebuild switch --flake .#<your-hostname>If successful, open a new shell session so all managed environment changes take effect.
- Entry point is
nvim/init.lua. - Plugins are organized by domain under
nvim/lua/plugins/*. - LSP server configs are in
nvim/lsp/*.luaand enabled fromnvim/lua/core/lsp.lua. lazy.nvimbootstraps itself on first launch.
-
Rebuild and switch:
sudo darwin-rebuild switch --flake .#<your-hostname> -
Build without switching:
darwin-rebuild build --flake .#<your-hostname> -
Edit secrets:
sops secrets.yaml
- If
darwin-rebuildfails on SOPS secrets, verify:~/.config/sops/age/keys.txtexists- recipient in
.sops.yamlmatches your key secrets.yamlis encrypted for that recipient
- If Neovim config does not load, confirm repo path is
~/dotfilesor update the symlink path inhome.nix. - If Homebrew apps do not appear immediately, run
darwin-rebuild switchagain after fixing brew-specific errors.
- Do not commit plaintext secrets.
- Keep
secrets.yamlencrypted with SOPS. - Rotate API/session tokens periodically.