wip
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -1,6 +1,14 @@
|
|||||||
Host tuulikki.scalene.net
|
Match Host tuulikki.scalene.net exec "ip route |grep -q -E '^(192.168.101.0/24|10.88.0.0/16)'"
|
||||||
|
User jswank
|
||||||
|
Port 22
|
||||||
|
|
||||||
|
Host tuulikki.scalene.net
|
||||||
|
User jswank
|
||||||
Port 22022
|
Port 22022
|
||||||
|
|
||||||
|
Host tonttu.scalene.net
|
||||||
|
User jswank
|
||||||
|
|
||||||
Host www.scalene.net
|
Host www.scalene.net
|
||||||
User scalene
|
User scalene
|
||||||
Port 22022
|
Port 22022
|
||||||
@@ -8,5 +16,6 @@ Host www.scalene.net
|
|||||||
Host tilde.club
|
Host tilde.club
|
||||||
User eke
|
User eke
|
||||||
|
|
||||||
Match host git.scalene.net exec "ip route |grep -q -E '^(192.168.101.0/24|10.88.0.0/16)'"
|
Match Host git.scalene.net exec "ip route |grep -q -E '^(192.168.101.0/24|10.88.0.0/16)'"
|
||||||
|
User jswank
|
||||||
Hostname tonttu.scalene.net
|
Hostname tonttu.scalene.net
|
||||||
|
|||||||
15
zsh/.local/share/zsh/functions/export-secret
Normal file
15
zsh/.local/share/zsh/functions/export-secret
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
export-secret() {
|
||||||
|
local name="$1"
|
||||||
|
local file="/run/secrets/${name}"
|
||||||
|
|
||||||
|
if [[ ! -f "$file" ]]; then
|
||||||
|
echo "Error: secret file not found: $file" >&2
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Read first line, remove trailing spaces/tabs, convert nulls to newlines
|
||||||
|
local value
|
||||||
|
value=$(head -n1 "$file" | sed 's/[ \t]*$//' | tr '\0' '\n')
|
||||||
|
|
||||||
|
export "${name}=${value}"
|
||||||
|
}
|
||||||
19
zsh/.zshrc
19
zsh/.zshrc
@@ -77,22 +77,23 @@ precmd_functions+=( set_prompt )
|
|||||||
|
|
||||||
# setup SSH keys
|
# setup SSH keys
|
||||||
if [ -e /usr/bin/keychain ]; then
|
if [ -e /usr/bin/keychain ]; then
|
||||||
eval $(/usr/bin/keychain --eval --agents ssh -Q --quiet id_ed25519)
|
# eval $(/usr/bin/keychain --eval --agents ssh -Q --quiet id_ed25519)
|
||||||
|
eval $(/usr/bin/keychain --eval -Q --quiet id_ed25519)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# direnv setup
|
# direnv setup
|
||||||
whence -p direnv &>/dev/null && eval "$(direnv hook zsh)"
|
whence -p direnv &>/dev/null && eval "$(direnv hook zsh)"
|
||||||
|
|
||||||
# setup CFA environment
|
# secrets
|
||||||
if [ -e $HOME/cfa-work/.zshrc ]; then
|
if [ -r $HOME/.env_secrets ]; then
|
||||||
. $HOME/cfa-work/.zshrc
|
export $(xargs < "$HOME/.env_secrets")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for env in $HOME/.config/*/.env; do
|
# for env in $HOME/.config/*/.env; do
|
||||||
if [ -r "$env" ]; then
|
# if [ -r "$env" ]; then
|
||||||
export $(xargs < "$env")
|
# export $(xargs < "$env")
|
||||||
fi
|
# fi
|
||||||
done
|
# done
|
||||||
|
|
||||||
# command line completion
|
# command line completion
|
||||||
autoload -U +X bashcompinit && bashcompinit
|
autoload -U +X bashcompinit && bashcompinit
|
||||||
|
|||||||
Reference in New Issue
Block a user