tldr; switch-fix.nix lets you set an automatic rollback to current generation / profile on nixos-rebuild [switch | boot]
unless you cancel with cancel-rollback
from a terminal within a set amount of time
7 Likes
Ooh, nice.
GitHub - serokell/deploy-rs: A simple multi-profile Nix-flake deploy tool. does similar things for anyone interested, I still hope that it eventually gets local deployment as a first class citizen, until then this project seems like a cool alternative
Yup, I started with deploy-rs, liked it! The two issues I had were, switch
would sometimes not “stick”, in that on reboot, a previous generation would be default, and the auto rollback was sometimes iffy, either because of internet connection issues, or not possible (at least at the time) with boot
(instead of switch
).
This bit of bits was originally to address that first issue, and eventually the second.
1 Like