diff --git a/justfile b/justfile index 85e173f..9b52f2b 100644 --- a/justfile +++ b/justfile @@ -11,12 +11,12 @@ update-flake-secrets: # full system rebuild from flake (stages changes and automatically detects host) rebuild-system: - git add *.nix + if [ -n "$(diff <(cat /etc/nixos/flake.lock) <(cat flake.lock))" ]; then echo "local flake.lock has diverged from system. Please update flake or rebase. Exiting" && exit 1; fi sudo nixos-rebuild switch --option eval-cache false --flake .#$(hostname) # test full system rebuild from flake (stages changes and automatically detects host) rebuild-system-test: - git add *.nix + if [ -n "$(diff <(cat /etc/nixos/flake.lock) <(cat flake.lock))" ]; then echo "local flake.lock has diverged from system. Please update flake or rebase. Exiting" && exit 1; fi sudo nixos-rebuild test --option eval-cache false --flake .#$(hostname) # updates all flake inputs for system