Pick the scope of the change.
On NixOS, nixos-rebuild build produces a system output without activating it. test activates it for the running system without setting it as the default for the next boot. switch does both.
boot is another option: it updates the boot configuration but leaves the current running system unchanged. Kernel changes still require a reboot to run the new kernel, even after switch.
# From a configured NixOS machine:
sudo nixos-rebuild build
# Try the new configuration in the running system:
sudo nixos-rebuild test
# Activate and make it the normal boot choice:
sudo nixos-rebuild switch
A successful build is one checkpoint.
Check the affected services after activation. If you changed a service, use systemctl status and journalctl to inspect it. A valid configuration can still contain the wrong value for your machine.
Each successful switch selects a system generation. Existing generations can remain available as recovery options, which is the subject of the next lesson.
Build prepares; test activates temporarily; switch activates and updates the boot default.