Skip to content

Commit

Permalink
nix-fast-build.sh: Disable ssh ControlMaster
Browse files Browse the repository at this point in the history
Signed-off-by: Henri Rosten <[email protected]>
  • Loading branch information
henrirosten committed Nov 20, 2024
1 parent f176382 commit 8315c12
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion scripts/nix-fast-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,21 @@ nix_fast_build () {
[ "$DEBUG" = "true" ] && set -x
echo ""
echo "[+] $(date +"$tfmt") Start: nix-fast-build '$target'"
# Do not use ssh ControlMaster as it might cause issues with
# nix-fast-build the way we use it. SSH multiplexing needs to be disabled
# both by exporting `NIX_SSHOPTS` and `--remote-ssh-option` since
# `--remote-ssh-option` only impacts commands nix-fast-build invokes
# on remote over ssh. However, some nix commands nix-fast-build runs
# locally (e.g. uploading sources) internally also make use of ssh. Thus,
# we need to export the relevant option in `NIX_SSHOPTS` to completely
# disable ssh multiplexing:
export NIX_SSHOPTS="-o ControlMaster=no"
# shellcheck disable=SC2086 # intented word splitting of $OPTS
nix-fast-build \
--flake "$target" \
--eval-workers 4 \
--option verbose 1 \
--option accept-flake-config true \
--remote-ssh-option ControlMaster no \
--remote-ssh-option StrictHostKeyChecking no \
--remote-ssh-option UserKnownHostsFile /dev/null \
--remote-ssh-option ConnectTimeout 10 \
Expand Down

0 comments on commit 8315c12

Please sign in to comment.