Skip to content

Commit

Permalink
Fix deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
arianvp committed Oct 1, 2024
1 parent b6791f8 commit 78faad7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions deploy/modules/ssm_documents/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ profile='{{ profile }}'
substituters='{{ substituters }}'
trustedPublicKeys='{{ trustedPublicKeys }}'

/run/current-system/sw/bin/nix build \
nix build \
--extra-experimental-features 'nix-command flakes' \
--extra-trusted-public-keys "$trustedPublicKeys" \
--extra-substituters "$substituters" \
--refresh \
--profile "$profile" \
"$installable"

if [ "$(/run/current-system/sw/bin/readlink /run/current-system)" == "$(/run/current-system/sw/bin/readlink "$profile")" ]; then
if [ "$(readlink -f /run/current-system)" == "$(readlink -f "$profile")" ]; then
echo "Already booted into the desired configuration"
exit 0
fi
Expand All @@ -25,8 +25,8 @@ if [ "$action" == "reboot" ]; then
do_reboot=1
fi

/run/wrappers/bin/sudo "$profile/bin/switch-to-configuration" "$action"
sudo "$profile/bin/switch-to-configuration" "$action"

if [ "$do_reboot" == 1 ]; then
exit 194
fi
fi

0 comments on commit 78faad7

Please sign in to comment.