Skip to content

Updating & Rollback

Marchyo is a NixOS flake, so updating and rolling back use the standard Nix machinery — there is no bespoke updater or “update channel” to manage. Every nixos-rebuild switch builds a new generation you can boot back into if something breaks.

The marchyo CLI wraps the whole loop:

Terminal window
marchyo update # nix flake update in your flake
marchyo upgrade # update inputs, then rebuild
marchyo rollback # switch back to the previous generation
marchyo gc # collect old generations (default: older than 14d)
marchyo diff # what changed between generations

Bump the pinned inputs (including marchyo itself), then rebuild:

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

On macOS use darwin-rebuild switch --flake .#yourhost instead.

Marchyo’s builders pick the package set for you, so an update tracks different channels depending on the system (see the Introduction):

  • Linux and aarch64-darwin ride nixpkgs unstable.
  • x86_64-darwin is pinned to stable nixos-26.05 (the last release supporting Intel macOS).

You do not add a separate nixpkgs input — updating the marchyo input is what advances your packages.

If a rebuild misbehaves, roll back to the previous generation:

Terminal window
sudo nixos-rebuild switch --rollback

Or pick any earlier generation from the boot menu (systemd-boot / GRUB) at startup — each generation is a separate boot entry. To inspect or prune them:

Terminal window
sudo nix-env --list-generations --profile /nix/var/nix/profiles/system
sudo nix-collect-garbage -d # remove old generations + free the store

If you have a checkout of Marchyo (rather than consuming it as an input), use the just recipes — just update bumps the flake inputs and re-syncs devenv.lock to the same nixpkgs revision, and just verify checks they stay aligned:

Terminal window
just update # nix flake update + sync devenv.lock
just verify # confirm flake.lock and devenv.lock agree
just check # nix flake check (evaluation tests)