Install NixOS
The final phase builds and installs NixOS from the per-host repo that
setup host generated, sets your passwords, and makes the machine
reachable after reboot.
Run it from the menu, or directly:
[bash]: Run this on your workstation:
setup install
It auto-discovers the host repo and reads the host name from its flake, then shows a review screen:
================ Review =================
Host repo: /mnt/home/ryan/nixos
Host: box
User: ryan
Target root: /mnt
=========================================
This builds and installs NixOS into /mnt (downloads the system
closure from the binary cache) and sets passwords.
? Proceed with install? (Y/n)
After you confirm, it:
- Re-pins sway-home to its latest commit (so a fresh fix is picked up
without regenerating the repo) and commits the updated lock. Pass
--no-updateto install from the committed pin instead. - Runs
nixos-install, which downloads and builds the system and, at the end, prompts you to set the root password. - Sets a password for your user account.
- Fixes ownership of the config repo so it belongs to your user after reboot.
- Copies the live ISO’s NetworkManager profiles (e.g. your pre-seeded WiFi) into the target, so a headless machine stays reachable.
- Copies the live ISO’s SSH host keys into the target, so the installed machine keeps the same SSH identity – no “REMOTE HOST IDENTIFICATION HAS CHANGED” warning for anyone who already trusted the live host key.
✅ Install complete.
Config repo: /home/ryan/nixos (owned by ryan after reboot)
Apply future changes with: sudo nixos-rebuild switch --flake .#box
? Reboot now? (y/N)
When it finishes, reboot. There is no separate bootstrap step – the
machine comes up fully configured, and your config repo is already on
disk at ~/nixos, owned by your user.