diff --git a/Makefile b/Makefile index cfd733c..e59e468 100644 --- a/Makefile +++ b/Makefile @@ -18,6 +18,9 @@ endif switch: $(SWITCH_CMD) +rollback: + nixos-rebuild --use-remote-sudo switch --rollback -I nixos-config="modules/machines/$(HOSTNAME)/configuration.nix + update: nix flake update diff --git a/README.md b/README.md index c3161ee..9afa17d 100644 --- a/README.md +++ b/README.md @@ -25,6 +25,14 @@ make update If there are updates, they should be reflected in [flake.lock](./flake.lock). +## Rollback + +To rollback to the previous generation: + +```sh +make rollback +``` + ## Pre-commit hooks Pre-commit hooks are automatically activated when [direnv](https://github.com/direnv/direnv) is installed.