Fix rollbacks

This commit is contained in:
Dave Gallant
2024-03-14 22:32:45 -04:00
parent 753c444ccd
commit 12c41d07ab
2 changed files with 11 additions and 2 deletions

View File

@@ -38,7 +38,13 @@ If there are updates, they should be reflected in [flake.lock](./flake.lock).
To rollback to the previous generation: To rollback to the previous generation:
```sh ```sh
just rollback just rollback-linux
```
or on macOS:
```sh
just rollback-mac
``` ```
## Garbage collection ## Garbage collection

View File

@@ -8,9 +8,12 @@ build-linux:
build-mac: build-mac:
darwin-rebuild switch -I nixos-config="machines/$host/configuration.nix" --flake . darwin-rebuild switch -I nixos-config="machines/$host/configuration.nix" --flake .
rollback: rollback-linux:
nixos-rebuild --use-remote-sudo switch --rollback -I nixos-config="machines/$host/configuration.nix" nixos-rebuild --use-remote-sudo switch --rollback -I nixos-config="machines/$host/configuration.nix"
rollback-mac:
darwin-rebuild --rollback -I nixos-config="machines/$host/configuration.nix"
update: update:
@./nix-flake-update.sh @./nix-flake-update.sh