Home Manager configurations for my personal and work macOS accounts on Apple Silicon.
jmp: personal accountwork: work account
Use these steps on a brand new Mac before this managed Home Manager environment exists.
-
Install manual prerequisites.
Do not use Homebrew for this setup. Install these with Apple-provided tools or official vendor installers only:
-
Determinate Nix: download and run
Determinate.pkgfrom https://determinate.systems/nix/ -
Xcode Command Line Tools: install with:
xcode-select --install
-
Ghostty: download the official macOS
.dmgfrom https://ghostty.org/ and dragGhostty.appinto/Applications. -
SauceCodePro Nerd Font Mono: download
SauceCodeProfrom https://www.nerdfonts.com/font-downloads and install the font files with Font Book. This matches the Ghosttyfont-familysetting in this repo.
After installing Determinate Nix, open a new terminal and confirm that Nix is available:
nix --version
-
-
Clone this configuration.
Clone the repo into the Home Manager config location:
mkdir -p ~/.config git clone [email protected]:jimpudar/nix.git ~/.config/nix cd ~/.config/nix
If GitHub SSH is not set up yet, clone with HTTPS instead:
git clone https://github.com/jimpudar/nix.git ~/.config/nix cd ~/.config/nix
-
Bootstrap Home Manager.
On the first run, use
nix runbecause thehome-managercommand has not been installed into the user environment yet. Choose the profile for the macOS account you are setting up:nix run github:nix-community/home-manager/release-26.05 -- switch --flake ~/.config/nix#jmpOr for the work account:
nix run github:nix-community/home-manager/release-26.05 -- switch --flake ~/.config/nix#workWhen this finishes, open a new terminal so the newly managed shell environment is loaded.
-
Verify the managed environment.
home-manager generations which home-manager which nvim
-
Initialize LazyVim plugins.
Neovim and the LazyVim starter configuration are installed by this Home Manager configuration. On the first launch, LazyVim will bootstrap
lazy.nvimand plugins into Neovim's user data directory:nvim
After the first launch finishes installing plugins, run
:LazyHealthinside Neovim.
After the first successful switch, use the installed home-manager command.
Switch the personal account:
cd ~/.config/nix
home-manager switch --flake .#jmpSwitch the work account:
cd ~/.config/nix
home-manager switch --flake .#workUpdate all flake inputs and switch:
cd ~/.config/nix
nix flake update
home-manager switch --flake .#jmp # or .#workPreview pending changes before switching:
cd ~/.config/nix
home-manager build --flake .#jmp # or .#workflake.nixdefines thejmpandworkHome Manager outputs.modules/contains shared configuration used by both accounts.nvim/contains the shared LazyVim starter configuration.profiles/contains account-specific packages, Git settings, paths, and zsh startup snippets.
- This flake is currently pinned to
aarch64-darwin. - Nixpkgs, Home Manager, and
home.stateVersionare currently aligned on26.05. - Home Manager configures Ghostty, but it does not install the macOS
application bundle here because
programs.ghostty.package = null. - Home Manager installs Neovim. Do not install Neovim manually on a fresh machine for this setup.
- Home Manager writes the LazyVim starter config under
~/.config/nvim. LazyVim plugins are installed bylazy.nvimon first Neovim launch. - If an account already has unmanaged files under
~/.config/nvim, move them aside before switching to this Home Manager configuration. - Rootcell shell integration assumes the project checkout exists at
~/projects/rootcellforjmpand~/work/rootcellforwork. - The Home Manager profile is user-scoped; do not run
home-manager switchwithsudo. - Run each profile from the macOS account it manages.
- If
nixis unavailable immediately after installing Determinate Nix, open a new terminal window or restart the Mac.