Archived
Compare commits
4
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
784e064fa2 | ||
|
|
4a5afa6c1c | ||
|
|
9a0aea8f89 | ||
|
|
b013e28dcd |
@@ -487,6 +487,17 @@ nix_extra_opts
|
|||||||
# --- make sure this target has a registered host key --------------------
|
# --- make sure this target has a registered host key --------------------
|
||||||
echo
|
echo
|
||||||
echo "==> Ensuring host key exists and is registered..."
|
echo "==> Ensuring host key exists and is registered..."
|
||||||
|
_host_keyfile="${repo_root}/host-keys/${flake_target}_ssh_host_ed25519_key"
|
||||||
|
if [[ ! -f "$_host_keyfile" ]]; then
|
||||||
|
echo " No host key found for ${flake_target}; generating one via prepare-host-key.sh..."
|
||||||
|
_prepare_host_key="${repo_root}/scripts/secrets/prepare-host-key.sh"
|
||||||
|
if [[ "$dry_run" -eq 1 ]]; then
|
||||||
|
echo "[dry-run] would run: bash ${_prepare_host_key} ${flake_target}"
|
||||||
|
else
|
||||||
|
bash "$_prepare_host_key" "$flake_target"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
unset _host_keyfile _prepare_host_key
|
||||||
sync_args=("$flake_target")
|
sync_args=("$flake_target")
|
||||||
[[ "$dry_run" -eq 1 ]] && sync_args+=(--dry-run)
|
[[ "$dry_run" -eq 1 ]] && sync_args+=(--dry-run)
|
||||||
bash "$sync_keys" "${sync_args[@]}"
|
bash "$sync_keys" "${sync_args[@]}"
|
||||||
@@ -740,8 +751,8 @@ nix build --no-use-registries --no-accept-flake-config "${NIX_OPTS[@]}" \
|
|||||||
".#nixosConfigurations.${target}.config.system.build.diskoImagesScript" \
|
".#nixosConfigurations.${target}.config.system.build.diskoImagesScript" \
|
||||||
--out-link "result-${target}"
|
--out-link "result-${target}"
|
||||||
$sudo_pfx "./result-${target}" \
|
$sudo_pfx "./result-${target}" \
|
||||||
--pre-format-files "host-keys/${target}_ssh_host_ed25519_key" /etc/ssh/ssh_host_ed25519_key \
|
--pre-format-files "$(pwd)/host-keys/${target}_ssh_host_ed25519_key" /etc/ssh/ssh_host_ed25519_key \
|
||||||
--pre-format-files "host-keys/${target}_ssh_host_ed25519_key.pub" /etc/ssh/ssh_host_ed25519_key.pub \
|
--pre-format-files "$(pwd)/host-keys/${target}_ssh_host_ed25519_key.pub" /etc/ssh/ssh_host_ed25519_key.pub \
|
||||||
--build-memory 2048
|
--build-memory 2048
|
||||||
built="$(find . -maxdepth 1 -name '*.raw' -newer "result-${target}" | head -1)"
|
built="$(find . -maxdepth 1 -name '*.raw' -newer "result-${target}" | head -1)"
|
||||||
if [[ -z "$built" ]]; then
|
if [[ -z "$built" ]]; then
|
||||||
|
|||||||
Reference in new issue
Block a user