diff --git a/.bashrc b/.bashrc index 5a0602f10a22d1d9e3791aa2b0f35c916b963937..b341e16fc28f7ffc3ab06d00da525eb58b94c573 100644 --- a/.bashrc +++ b/.bashrc @@ -293,7 +293,11 @@ toux () { } wb () { - ssh -t workbench.shore.co.il 'if tmux ls >/dev/null 2>&1; then tmux a; else tmux; fi;' + toolbox run --container workbench -- /bin/sh -ic 'if tmux ls >/dev/null 2>&1; then tmux a; else tmux; fi;' +} + +wbr () { + ssh -t ns4.shore.co.il toolbox run --container workbench -- /bin/sh -ic "'if tmux ls >/dev/null 2>&1; then tmux a; else tmux; fi;'" } __prompt () { @@ -380,5 +384,21 @@ then ! command -v direnv > /dev/null || eval "$(direnv hook bash)" fi +if [ ! -S /var/run/docker.sock ] && + [ -z "${DOCKER_HOST:-}" ] && + [ -S "$XDG_RUNTIME_DIR/podman/podman.sock" ] && + [ -w "$XDG_RUNTIME_DIR/podman/podman.sock" ] +then + export DOCKER_HOST="unix://$XDG_RUNTIME_DIR/podman/podman.sock" +fi + +if [ "$HOSTNAME" = 'toolbox' ] +then + alias flatpak-spawn='/usr/libexec/flatpak-xdg-utils/flatpak-spawn --host' + [ ! -S "$XDG_RUNTIME_DIR/podman/podman.sock" ] || + [ ! -w "$XDG_RUNTIME_DIR/podman/podman.sock" ] || + alias podman='podman --remote' +fi + # shellcheck disable=SC2119 prune_ssh_sockets diff --git a/.ssh/config.d/20_shore b/.ssh/config.d/20_shore index 23c6148f86872b4ace408d13d5529ea7dd57e9e6..7947d1c44acefdb482b5e5ca8a195382744cc0e5 100644 --- a/.ssh/config.d/20_shore +++ b/.ssh/config.d/20_shore @@ -18,11 +18,6 @@ IdentityFile ~/.ssh/gitlab_ed25519 HostName host01.shore.co.il Port 2222 -Host workbench.shore.co.il -HostName ns4.shore.co.il -LocalForward 8080 localhost:8080 -Port 2222 - Host *.shore.co.il 192.168.3.* IdentityFile ~/.ssh/shore_ecdsa IdentityFile ~/.ssh/shore_ed25519