From cd8352a5d9dd43da55811b5d719d631b2f5308fd Mon Sep 17 00:00:00 2001 From: clux Date: Mon, 7 Oct 2024 15:22:38 +0100 Subject: [PATCH] hostname/darwin switches guess i wasn't going to have more than one mac anyway Signed-off-by: clux --- .zshenv | 4 ++-- .zshrc | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.zshenv b/.zshenv index d1f5d1d..4b09bee 100755 --- a/.zshenv +++ b/.zshenv @@ -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 diff --git a/.zshrc b/.zshrc index eb44ac9..8843231 100644 --- a/.zshrc +++ b/.zshrc @@ -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