mirror of
https://github.com/DictXiong/dotfiles.git
synced 2026-11-23 20:38:16 +08:00
[dev] nixos; riot multiple targets; install without ssh keys (#42)
* auth: add .eid/authorized_certificates for pam pkcs11 auth * .zshrc: alias sl for sudo zsh -l * to-install: nix * zshrc: use gnu ls on mac * zshrc: try to use gnu-ls * try to fix ci for macos * riot: add domain box[0-9] * riot: shortcuts i,x,j * .zshrc: warn if not in main channel * sagt: reset agent so paths * sagt: import ssh-agent -P paths * common.sh: is_port_free and get_free_port * riot use get_free_port to fix issue on windows * riot: ssh support instant command * riot: proxy delimiter from comma (,) to slash (/) * riot: support multiple remotes, delimiter=comma (,) * riot: fix ci; install.sh: --no-ssh * riot: improve ci --------- Co-authored-by: xiongdian.me <xiongdian.me@bytedance.com>
This commit is contained in:
@@ -5,9 +5,14 @@ export DFS_COLOR=1
|
||||
source "$THIS_DIR/common.sh"
|
||||
|
||||
|
||||
SO_PATHS=(
|
||||
"/usr/lib/x86_64-linux-gnu/opensc-pkcs11.so" # ubuntu 22.04
|
||||
"/run/current-system/sw/lib/opensc-pkcs11.so" # nixos 23.05
|
||||
"/Library/OpenSC/lib/opensc-pkcs11.so" # macos 13.4
|
||||
)
|
||||
|
||||
find_so_file()
|
||||
{
|
||||
local SO_PATHS=( "/usr/lib64/opensc-pkcs11.so" "/usr/local/lib/opensc-pkcs11.so" "/run/current-system/sw/lib/opensc-pkcs11.so" )
|
||||
local SO_FILE
|
||||
for SO_FILE in ${SO_PATHS[*]}; do
|
||||
if [[ -f "$SO_FILE" ]]; then
|
||||
@@ -19,7 +24,8 @@ find_so_file()
|
||||
|
||||
create_agent()
|
||||
{
|
||||
ssh-agent -P "/usr/lib64/*,/usr/local/lib/*,/nix/store/*"
|
||||
local IFS=","
|
||||
ssh-agent -P "${SO_PATHS[*]}"
|
||||
}
|
||||
|
||||
kill_agent()
|
||||
|
||||
Reference in New Issue
Block a user