Add make rollback

This commit is contained in:
Dave Gallant
2023-08-08 19:27:35 -04:00
parent 93c13bbc2d
commit 8fa3909163
2 changed files with 11 additions and 0 deletions

View File

@@ -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

View File

@@ -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.