A replacement laptop can be set up remotely when you already have a working Mac with a Nix configuration and can connect to the new machine over SSH. In this example, Claude Code ran on the existing Mac, adapted the configuration for a loaner, built the system, and deployed it to the loaner. The owner enabled access, entered passwords, and signed in to services on the laptop.
The existing setup used nix-darwin for macOS settings, Home Manager for user packages and shell configuration, Homebrew for GUI apps, and chezmoi for additional dotfiles. It also had a deploy-rs configuration for remote deployment. The procedure below describes that setup, with placeholders and adjustments for other repositories. It assumes you have permission to administer the new machine and an existing, working configuration to adapt.