Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion nests/mac/setup.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
"bun",
"rust",
"claude-code",
"codex"
"codex",
"machines"
],
"rc_scripts": [
"common:fzf.sh",
Expand Down
1 change: 1 addition & 0 deletions setups/machines/setup.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "machines",
"install": "local:setup.sh",
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Link runs before install in All operation

Medium Severity

The machines setup links ssh_config.secret (produced by op inject in the install hook), but the framework's Operation::All in apply_operation_once calls link_once before install_once. When a user runs owl nest all, the link step will fail with "source not found" (silently printing ❌) because ssh_config.secret hasn't been generated yet. The install then creates the file, but the link is never retried, leaving ~/.ssh/config unlinked.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit ebe1103. Configure here.

"links": [
{
"source": "local:ssh_config.secret",
Expand Down
43 changes: 40 additions & 3 deletions setups/machines/setup.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,43 @@
sudo pacman -S sftpman
#!/bin/bash
set -euo pipefail

SCRIPT_DIR="$(dirname "$0")"
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"

case "$(uname -s)" in
Linux)
if command -v pacman &> /dev/null; then
sudo pacman -S --needed --noconfirm sftpman
fi
;;
Darwin)
# sftpman is Linux-only; skip on macOS.
;;
*)
echo "Unsupported OS: $(uname -s)"
exit 1
;;
esac

op inject --in-file $SCRIPT_DIR/ssh_config_template --out-file $SCRIPT_DIR/ssh_config.secret
if ! command -v op &> /dev/null; then
case "$(uname -s)" in
Darwin)
if command -v brew &> /dev/null; then
echo "Installing 1Password CLI via Homebrew..."
brew install 1password-cli
else
echo "1Password CLI (op) not found. Install Homebrew or grab op from https://1password.com/downloads/command-line/"
exit 1
fi
;;
Linux)
if command -v yay &> /dev/null; then
yay -S --noconfirm 1password-cli
else
echo "1Password CLI (op) not found. Install it first."
exit 1
fi
;;
esac
fi

op inject --in-file "$SCRIPT_DIR/ssh_config_template" --out-file "$SCRIPT_DIR/ssh_config.secret"
Loading