Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
xvzc committed Jun 10, 2024
1 parent d51cd8a commit 4b89a90
Show file tree
Hide file tree
Showing 6 changed files with 47 additions and 36 deletions.
6 changes: 3 additions & 3 deletions dot_profile
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ export PATH="$PATH:~/.spoof-dpi/bin"
# ┌───────────┐
# │ 1PASSWORD │
# └───────────┘
_is_linux && export SSH_AUTH_SOCK=~/.1password/agent.sock
_is_darwin && \
export SSH_AUTH_SOCK=~/Library/Group\ Containers/2BUA8C4S2C.com.1password/t/agent.sock
# _is_linux && export SSH_AUTH_SOCK=~/.1password/agent.sock
# _is_darwin && \
# export SSH_AUTH_SOCK=~/Library/Group\ Containers/2BUA8C4S2C.com.1password/t/agent.sock

# ┌──────────┐
# │ HOMEBREW │
Expand Down
19 changes: 0 additions & 19 deletions dot_zsh/env.zsh

This file was deleted.

25 changes: 24 additions & 1 deletion dot_zshenv
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
#!/bin/zsh

# ┌─────────────┐
# │ ZSH_OPTIONS │
# └─────────────┘
setopt no_global_rcs

# ┌───────────┐
# │ DETECT_OS │
# └───────────┘
export CUR_OS=$(uname)

if [ "$CUR_OS" = "Darwin" ]; then
Expand All @@ -14,4 +22,19 @@ else
function _is_linux() { return 1 }
fi

setopt no_global_rcs
# ┌────────────┐
# │ COMMON ENV │
# └────────────┘
export CLICOLOR=1
export CLICOLOR_FORCE=1

# reduce esc delay
export KEYTIMEOUT=1

# set default editor to nvim
export EDITOR=nvim

# PATHS
export PATH="$HOME/.local/bin:$PATH"
export PATH="$HOME/.scripts/git:$PATH"

1 change: 0 additions & 1 deletion dot_zshrc
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ fpath+="$DOT_ZSH/_completion"
source "$DOT_ZSH/oh-my-zsh/oh-my-zsh.sh"
source "$DOT_ZSH/style.zsh"
source "$DOT_ZSH/alias.zsh"
source "$DOT_ZSH/env.zsh"
source "$DOT_ZSH/opt.zsh"
source "$DOT_ZSH/keymap.zsh"
source "$DOT_ZSH/func.zsh"
Expand Down
25 changes: 17 additions & 8 deletions init_private_resources.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,26 @@ check-1password() {
open -a 1Password
error "Login 1password app"
fi

if ! ssh-add -l &>/dev/null; then
open -a 1Password
error "Setup 1password ssh-agent"
fi
}

check-1password

op read "op://Personal/SSH Github xvzc/public key" >~/.ssh/xvzc.pub &&
op read --force \
"op://mbqg52gjbireiglzwrrck5nbcm/br6vmskxg3yyesbwjfv2zev46y/public key" \
| tr -d "\015" > ~/.ssh/xvzc.pub && \
chmod 600 ~/.ssh/xvzc.pub

op read "op://Personal/SSH Arch Linux/public key" >~/.ssh/arch.pub &&
chmod 600 ~/.ssh/arch.pub
op read --force \
"op://mbqg52gjbireiglzwrrck5nbcm/br6vmskxg3yyesbwjfv2zev46y/private key?ssh-format=openssh" \
| tr -d '\015' > ~/.ssh/xvzc && \
chmod 600 ~/.ssh/xvzc

op read --force \
"op://mbqg52gjbireiglzwrrck5nbcm/6dnb4xqgeh2voofslw3dr35dw4/public key" \
| tr -d '\015' > ~/.ssh/arch.pub && \
chmod 600 ~/.ssh/arch.pub

op read --force \
"op://mbqg52gjbireiglzwrrck5nbcm/6dnb4xqgeh2voofslw3dr35dw4/private key?ssh-format=openssh" \
| tr -d '\015' > ~/.ssh/arch && \
chmod 600 ~/.ssh/arch
7 changes: 3 additions & 4 deletions private_dot_ssh/private_config
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,10 @@ Host home
HostName home.xvzc.dev
User jerry
IdentitiesOnly yes
IdentityFile ~/.ssh/arch.pub
IdentityFile ~/.ssh/arch

Host xvzc.github.com
HostName github.com
ForwardAgent yes
HostName github.com
IdentitiesOnly yes
IdentityFile ~/.ssh/xvzc.pub
IdentityFile ~/.ssh/xvzc

0 comments on commit 4b89a90

Please sign in to comment.