Choosing the Right NixOS Generation Rollback Strategy for Production
Manage NixOS generations safely in production: choose between automatic GC, manual cleanup, or flake‑based builds, and learn how to validate rollbacks with systemd‑boot.
ReadMeFeed / Community knowledge
Real questions. Useful conversations. Find the people who know your stack.
Manage NixOS generations safely in production: choose between automatic GC, manual cleanup, or flake‑based builds, and learn how to validate rollbacks with systemd‑boot.
NixOS makes a bad configuration change recoverable by keeping the previous system generation bootable. Here is how generations work, a worked SSH/user example, and the limits of rollback.
NixOS creates a separate GRUB entry for each system generation, allowing a manual rollback to a known‑good state after a failed upgrade. However, the project has not defined a default policy for automatically booting the previous generation when the system fails to start. The decision must balance safety against the risk of repeatedly booting a broken genera