From 8fa390916370c8f269e13f2bd9fc7763cd327706 Mon Sep 17 00:00:00 2001 From: Dave Gallant Date: Tue, 8 Aug 2023 19:27:35 -0400 Subject: [PATCH] Add make rollback --- Makefile | 3 +++ README.md | 8 ++++++++ 2 files changed, 11 insertions(+) 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.