deploy: archive after an update
This commit is contained in:
parent
81046c56a7
commit
b58e70e76c
20
bin/deploy
20
bin/deploy
@ -10,10 +10,8 @@ rebuild() {
|
||||
host="$(resolveAlias $1)"
|
||||
skip_check=$2
|
||||
|
||||
msg "Rebuilding: ${host}"
|
||||
|
||||
set -x
|
||||
build_host=${BUILD_HOST:-$host}
|
||||
msg "Rebuilding: ${host} using ${build_host}"
|
||||
nixos-rebuild ${TRACE} --flake .#${1} --build-host "root@${build_host}" --target-host "root@${host}" switch 2>&1 | nom
|
||||
return $?
|
||||
}
|
||||
@ -119,17 +117,17 @@ if [ "$1" = "update" ]; then
|
||||
done
|
||||
|
||||
# TODO: capture commit message and wrap it with what is being updated.
|
||||
if [ $can_sign = 1 ]; then
|
||||
if [ "$single" != "" ]; then
|
||||
nix flake update --commit-lock-file "$single"
|
||||
else
|
||||
nix flake update --commit-lock-file
|
||||
fi
|
||||
exit
|
||||
else
|
||||
if [ $can_sign != 1 ]; then
|
||||
echo "Can't find signing key."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "$single" != "" ]; then
|
||||
nix flake update --commit-lock-file "$single"
|
||||
else
|
||||
nix flake update --commit-lock-file
|
||||
fi
|
||||
nix flake archive
|
||||
fi
|
||||
|
||||
if [ "$1" = "installer" ]; then
|
||||
|
Loading…
Reference in New Issue
Block a user