From 346fccde9e5ff6d05e1ca1a7d18fcc7925a15085 Mon Sep 17 00:00:00 2001 From: jan Date: Thu, 10 Feb 2022 21:15:29 +0100 Subject: [PATCH] Optionally load files from second/private repo --- install.sh | 13 ++++++++++--- ssh/hosts | 3 --- zshrc | 5 +++++ 3 files changed, 15 insertions(+), 6 deletions(-) delete mode 100644 ssh/hosts diff --git a/install.sh b/install.sh index dee9fbb..2dfb98a 100755 --- a/install.sh +++ b/install.sh @@ -8,9 +8,16 @@ rm ~/.zshrc ln -s ~/.dotfiles/zshrc ~/.zshrc touch ~/.dotfiles/zsh/device-specific sudo chsh -s $(which zsh) $USER -echo "Include ~/.dotfiles/ssh/hosts" >> ~/.ssh/config -chmod 600 ~/.dotfiles/ssh/hosts -chmod 600 ~/.ssh/config + +# If private repo is available, add ssh config + hosts +if [[ -d $HOME/.jan ]]; then + echo "Include ~/.jan/ssh_hosts" >> ~/.ssh/hosts + echo "Include ~/.dotfiles/ssh/settings" >> ~/.ssh/config + chmod 600 ~/.ssh/config + chmod 600 ~/.jan/ssh_hosts +fi + +# Remove old bash files rm ~/.bashrc rm ~/.bash_logout rm ~/.bash_history diff --git a/ssh/hosts b/ssh/hosts deleted file mode 100644 index 4c013ae..0000000 --- a/ssh/hosts +++ /dev/null @@ -1,3 +0,0 @@ -# Add the following to ~/.ssh/config -# Include ~/.dotfiles/ssh/hosts - diff --git a/zshrc b/zshrc index 9dbf55c..4b40b8c 100644 --- a/zshrc +++ b/zshrc @@ -35,6 +35,11 @@ source $HOME/.dotfiles/zsh/scripts source $HOME/.dotfiles/zsh/ffmpeg source $HOME/.dotfiles/zsh/device-specific +# Load private information from second repo +if [[ -d $HOME/.jan ]]; then + source $HOME/.jan/credentials +fi + # Addons addons ## NNotes