zsh: Remove docker functions

They either are not needed anymore (since the tools are in nixpkgs), I
don’t need them anymore or are moved to their specific project as a
script.
This commit is contained in:
Simon Bruder 2020-12-18 17:48:09 +01:00
parent 7eae9682de
commit c3aa71c5ae
No known key found for this signature in database
GPG key ID: 6F03E0000CC5B62F
2 changed files with 0 additions and 157 deletions

View file

@ -1,156 +0,0 @@
# Docker function definitions
function speedtest() {
docker run --init --rm tianon/speedtest --accept-license --accept-gdpr -p $@
}
function vobsub2srt() {
docker run \
--rm \
-v $PWD:/data \
-w /data \
-u $(id -u) \
sbruder/vobsub2srt \
--blacklist '„“”|/\`_~<>flfiff' \
$@
}
function aucdtect() {
docker run \
--rm \
-v "$PWD:/home/aucdtect/:ro" \
-e uid=$(id -u) \
-e gid=$(id -g) \
sbruder/aucdtect \
$@
}
function unrar () {
docker run \
-it \
--rm \
-v "$PWD:/data" \
-w /data \
-u $(id -u) \
r.sbruder.de/unrar \
$@
}
function waifu2x() {
docker run \
--rm \
--init \
-it \
-v "$PWD:/data" \
-w /data \
-v "$HOME/.waifu2x:/home/waifu2x/.waifu2x" \
-e HOME=/home/waifu2x \
-u $(id -u) \
--group-add $(getent group video|cut -d: -f3) \
--group-add $(getent group render|cut -d: -f3) \
--device /dev/dri \
r.sbruder.de/waifu2x-converter-cpp \
$@
}
function waifu2x-photo() {
waifu2x --model-dir /usr/local/share/waifu2x-converter-cpp-photo $@
}
function dive() {
docker run \
--rm \
-it \
-v /var/run/docker.sock:/var/run/docker.sock \
wagoodman/dive \
$@
}
function vapoursynth() {
docker run \
--rm \
-it \
-e WAYLAND_DISPLAY \
-e QT_QPA_PLATFORM \
-e XDG_RUNTIME_DIR \
-u $(id -u) \
-v ${XDG_RUNTIME_DIR}/${WAYLAND_DISPLAY}:${XDG_RUNTIME_DIR}/${WAYLAND_DISPLAY} \
-v "$HOME/.config/:/home/vapoursynth/.config/" \
-v "$PWD:/data/" \
-w /data/ \
--group-add $(getent group video|cut -d: -f3) \
--group-add $(getent group render|cut -d: -f3) \
--device /dev/dri \
--device /dev/kfd \
r.sbruder.de/vapoursynth \
$@
}
function yuuno() {
docker run \
--rm \
-it \
-u $(id -u) \
-v "$PWD:/data/" \
-w /data/ \
-p 8087:8087 \
--group-add $(getent group video|cut -d: -f3) \
--group-add $(getent group render|cut -d: -f3) \
--device /dev/dri \
--device /dev/kfd \
r.sbruder.de/vapoursynth \
jupyter notebook --ip 0.0.0.0 --port 8087
}
function aegisub() {
docker run \
--rm \
-it \
--device /dev/dri \
--group-add $(getent group video|cut -d: -f3) \
--group-add $(getent group video|cut -d: -f3) \
-e DISPLAY \
-e PULSE_COOKIE=/run/pulse/cookie \
-e PULSE_SERVER=/run/user/$(id -u)/pulse/native \
-u $(id -u) \
-v $HOME/.aegisub/:/home/aegisub/.aegisub/ \
-v $HOME/.config/pulse/cookie:/run/pulse/cookie \
-v $HOME/.fonts/:/home/aegisub/.fonts/ \
-v $PWD:/home/aegisub/data/ \
-v /run/user/$(id -u)/pulse/native:/run/user/$(id -u)/pulse/native \
-v /tmp/.X11-unix:/tmp/.X11-unix \
r.sbruder.de/aegisub \
$@
}
function ctop {
docker run \
--rm \
-it \
--name=ctop \
--volume /var/run/docker.sock:/var/run/docker.sock:ro \
quay.io/vektorlab/ctop
}
function gcloud {
docker run \
--rm \
-it \
-e TERM=xterm-256color \
-v $HOME/.config/gcloud/:/root/.config/gcloud/ \
-v $HOME/.config/gcloud-ssh/:/root/.ssh/ \
google/cloud-sdk \
gcloud "$@"
}
function netlify() {
docker run \
--rm \
-it \
--init \
-v $HOME/.netlify:/home/node/.netlify \
-v $PWD:/data/ \
-w /data/ \
r.sbruder.de/netlify-cli \
"$@"
}

View file

@ -55,7 +55,6 @@ in
eval $(${pkgs.coreutils}/bin/dircolors -b ${dircolors-solarized}/dircolors.ansi-universal)
source ${../files/zsh/functions.zsh}
source ${../files/zsh/docker.zsh}
'';
};
};