Skip to content

Updating

Updating Marchyo is ordinary NixOS. There’s no special updater and no “update channel” to babysit. You bump the pinned versions your system is built from, rebuild, and if you don’t like the result, you boot the previous version. Every rebuild saves a generation — a complete, bootable snapshot of your system — so going back is always an option.

The marchyo CLI wraps the whole loop into a few words:

Terminal window
marchyo update # fetch the latest versions
marchyo upgrade # fetch the latest, then rebuild onto them
marchyo rollback # go back to the previous generation
marchyo gc # clean up old generations you no longer need
marchyo diff # see what changed between generations

For most people, marchyo upgrade is the whole story: it updates and rebuilds in one step.

If you’d rather run it by hand, the two steps are: bump the versions, then rebuild.

Terminal window
# In the directory holding your flake.nix:
nix flake update # bump everything to the latest
# or just Marchyo:
nix flake update marchyo
sudo nixos-rebuild switch --flake .#yourhost

On a Mac it’s darwin-rebuild switch --flake .#yourhost instead.

Marchyo picks the package set for you, so there’s no separate nixpkgs to manage. Updating Marchyo is what moves your packages forward. (On most systems that’s the rolling “unstable” set; Intel Macs are pinned to a stable release.)

If a rebuild misbehaves, undo it:

Terminal window
sudo nixos-rebuild switch --rollback

Or reboot and pick any earlier generation straight from the boot menu — each one is its own entry, so even a system that won’t come up gives you a working version to return to. That’s the safety net that makes updating low-stakes: you can always get back to the last system that worked.

Old generations pile up over time and take disk space. marchyo gc prunes the old ones (by default, anything older than two weeks). If you’d rather do it by hand:

Terminal window
sudo nix-collect-garbage -d

That removes old generations and frees the store. Keep at least one known-good generation around until you’re confident the current one is stable.