Skip to content

Commit

Permalink
hostname/darwin switches
Browse files Browse the repository at this point in the history
guess i wasn't going to have more than one mac anyway

Signed-off-by: clux <[email protected]>
  • Loading branch information
clux committed Oct 7, 2024
1 parent 0405403 commit cd8352a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .zshenv
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ if [[ "${OSTYPE}" =~ "darwin" ]]; then
# python on mac is also fun
path+="$(python3 -m site --user-base)/bin"

# Want a consistent hostname for ansible
# we re-initialise HostName / LocalHostName / ComputerName props at boot
# Consistent hostname var polyfill for scripts
# NB: HOST is zsh, HOSTNAME is bash
export HOSTNAME="$(scutil --get LocalHostName)"

# disable analytics sending to homebrew
Expand Down
3 changes: 1 addition & 2 deletions .zshrc
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,8 @@ export WORDCHARS="${${WORDCHARS:s@/@}:s@=@}"

if [[ ${HOST} = "hprks" ]]; then
key github main
elif [[ ${HOSTNAME} = "cluxm3" ]]; then
elif [[ "${OSTYPE}" =~ "darwin" ]]; then
key github work tl
# NB: HOST is zsh, HOSTNAME is bash (and polyfilled in zshenv for mac). prov uses HOSTNAME + bash.
else
[ -f ~/.keychain/agent-sh ] && source ~/.keychain/agent-sh
[ -f ~/.keychain/agent-sh-gpg ] && source ~/.keychain/agent-sh-gpg
Expand Down

0 comments on commit cd8352a

Please sign in to comment.