Add Claude Code CLI to dev environment

- Install claude binary to /usr/local/bin
- Symlink to ~/.local/bin for users (in PATH)
- Update learner-add.sh to set up symlink for new users
- Add /usr/local/bin to PATH via shellInit
This commit is contained in:
Dan 2026-01-02 14:45:49 -08:00
parent 33db9417ca
commit bd7bdda2b3
2 changed files with 12 additions and 0 deletions

View file

@ -30,6 +30,12 @@
direnv
];
# Add ~/.local/bin and /usr/local/bin to PATH for manually installed tools
environment.localBinInPath = true;
environment.shellInit = ''
export PATH="/usr/local/bin:$PATH"
'';
# Enable Nix flakes
nix.settings.experimental-features = [ "nix-command" "flakes" ];

View file

@ -84,6 +84,12 @@ create_user() {
echo '# Slack bot development tokens' >> "/home/$username/.bashrc"
echo 'source /etc/slack-learner.env' >> "/home/$username/.bashrc"
# Set up ~/.local/bin with claude symlink
local local_bin="/home/$username/.local/bin"
mkdir -p "$local_bin"
ln -sf /usr/local/bin/claude "$local_bin/claude"
chown -R "$username:users" "/home/$username/.local"
log_info "User created with SSH access"
}