mirror of
https://github.com/itme-brain/nixos.git
synced 2026-03-24 00:29:43 -04:00
added rollback justfile
This commit is contained in:
parent
9e6d16da2a
commit
113e7c4683
1 changed files with 8 additions and 0 deletions
8
justfile
8
justfile
|
|
@ -180,6 +180,14 @@ switch:
|
||||||
@echo -e "\033[32m->> Switching to next generation ->>\033[0m"
|
@echo -e "\033[32m->> Switching to next generation ->>\033[0m"
|
||||||
@sudo nixos-rebuild switch --flake .#{{SYSTEM}}
|
@sudo nixos-rebuild switch --flake .#{{SYSTEM}}
|
||||||
|
|
||||||
|
# Rollback to previous generation
|
||||||
|
rollback SYSTEM="nixos":
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
set -euo pipefail
|
||||||
|
if [ {{SYSTEM}} = "nixos" ]; then
|
||||||
|
sudo nixos-rebuild switch --rollback
|
||||||
|
fi
|
||||||
|
|
||||||
# NixOS-rebuild boot for the current system
|
# NixOS-rebuild boot for the current system
|
||||||
boot:
|
boot:
|
||||||
@echo -e "\033[34m->> Reboot to new generation ->>\033[0m"
|
@echo -e "\033[34m->> Reboot to new generation ->>\033[0m"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue