feat: more ricing to the devcontainer
Signed-off-by: Devin Buhl <devin@buhl.casa>
This commit is contained in:
2 files changed
+56
-54
No files matched your search
@@ -1,43 +1,71 @@
|
|||||||
#!/bin/sh
|
#!/usr/bin/env bash
|
||||||
set -e
|
set -e
|
||||||
set -o noglob
|
set -o noglob
|
||||||
|
|
||||||
ARCH="$(uname -m)"
|
|
||||||
if [ "$ARCH" = "x86_64" ]; then
|
|
||||||
ARCH="amd64"
|
|
||||||
elif [ "$ARCH" = "aarch64" ]; then
|
|
||||||
ARCH="arm64"
|
|
||||||
fi
|
|
||||||
|
|
||||||
#
|
|
||||||
# Install Tools from the Alpine Repositories
|
|
||||||
#
|
|
||||||
|
|
||||||
apk add --no-cache \
|
apk add --no-cache \
|
||||||
bash bind-tools ca-certificates curl python3 \
|
bash bind-tools ca-certificates curl python3 \
|
||||||
py3-pip moreutils jq git iputils \
|
py3-pip moreutils jq git iputils \
|
||||||
openssh-client starship
|
openssh-client starship fzf
|
||||||
|
|
||||||
apk add --no-cache \
|
apk add --no-cache \
|
||||||
--repository=https://dl-cdn.alpinelinux.org/alpine/edge/community \
|
--repository=https://dl-cdn.alpinelinux.org/alpine/edge/community \
|
||||||
age direnv fish helm kubectl kustomize sops yq
|
age direnv fish helm kubectl kustomize sops
|
||||||
|
|
||||||
#
|
sudo apk add --no-cache \
|
||||||
# Install Tools not in Alpine Repositories
|
--repository=https://dl-cdn.alpinelinux.org/alpine/edge/testing \
|
||||||
#
|
lsd
|
||||||
|
|
||||||
for installer_path in \
|
for installer_path in \
|
||||||
"budimanjojo/talhelper!" \
|
"budimanjojo/talhelper!" \
|
||||||
"cilium/cilium-cli!!?as=cilium" \
|
"cilium/cilium-cli!!?as=cilium" \
|
||||||
"cli/cli!!?as=gh" \
|
"cli/cli!!?as=gh" \
|
||||||
"cloudflare/cloudflared!" \
|
"cloudflare/cloudflared!" \
|
||||||
|
"derailed/k9s!" \
|
||||||
"fluxcd/flux2!!?as=flux" \
|
"fluxcd/flux2!!?as=flux" \
|
||||||
"go-task/task!" \
|
"go-task/task!" \
|
||||||
"k0sproject/k0sctl!" \
|
"k0sproject/k0sctl!" \
|
||||||
"derailed/k9s!" \
|
"kubecolor/kubecolor!" \
|
||||||
"stern/stern!" \
|
"stern/stern!" \
|
||||||
"siderolabs/talos!!?as=talosctl" \
|
"siderolabs/talos!!?as=talosctl" \
|
||||||
"yannh/kubeconform!"
|
"yannh/kubeconform!" \
|
||||||
|
"mikefarah/yq!"
|
||||||
do
|
do
|
||||||
curl -fsSL "https://i.jpillora.com/${installer_path}" | bash
|
curl -fsSL "https://i.jpillora.com/${installer_path}" | bash
|
||||||
done
|
done
|
||||||
|
|
||||||
|
# Create the fish configuration directory
|
||||||
|
mkdir -p /home/vscode/.config/fish/{completions,conf.d}
|
||||||
|
|
||||||
|
# Setup autocompletions for fish
|
||||||
|
for tool in cilium flux helm k9s kubectl kustomize talhelper talosctl; do
|
||||||
|
$tool completion fish > /home/vscode/.config/fish/completions/$tool.fish
|
||||||
|
done
|
||||||
|
gh completion --shell fish > /home/vscode/.config/fish/completions/gh.fish
|
||||||
|
k0sctl completion --shell fish > /home/vscode/.config/fish/completions/k0sctl.fish
|
||||||
|
stern --completion fish > /home/vscode/.config/fish/completions/stern.fish
|
||||||
|
yq shell-completion fish > /home/vscode/.config/fish/completions/yq.fish
|
||||||
|
|
||||||
|
# Add hooks into fish
|
||||||
|
tee /home/vscode/.config/fish/conf.d/hooks.fish > /dev/null <<EOF
|
||||||
|
if status is-interactive
|
||||||
|
direnv hook fish | source
|
||||||
|
starship init fish | source
|
||||||
|
end
|
||||||
|
EOF
|
||||||
|
|
||||||
|
# Add aliases into fish
|
||||||
|
tee /home/vscode/.config/fish/conf.d/aliases.fish > /dev/null <<EOF
|
||||||
|
alias ls lsd
|
||||||
|
alias kubectl kubecolor
|
||||||
|
alias k kubectl
|
||||||
|
EOF
|
||||||
|
|
||||||
|
# Custom fish prompt
|
||||||
|
tee /home/vscode/.config/fish/conf.d/fish_greeting.fish > /dev/null <<EOF
|
||||||
|
function fish_greeting
|
||||||
|
echo (set_color yellow)"Welcome! Press [enter] to clear the direnv error"
|
||||||
|
end
|
||||||
|
EOF
|
||||||
|
|
||||||
|
# Set ownership of fish directory to the vscode user
|
||||||
|
chown -R vscode:vscode /home/vscode/.config/fish
|
||||||
@@ -2,41 +2,15 @@
|
|||||||
set -e
|
set -e
|
||||||
set -o noglob
|
set -o noglob
|
||||||
|
|
||||||
# Create the fish configuration directory
|
# Setup fisher plugin manager for fish and install plugins
|
||||||
mkdir -p ~/.config/fish/{completions,conf.d}
|
/usr/bin/fish -c "
|
||||||
|
curl -sL https://git.io/fisher | source && fisher install jorgebucaran/fisher
|
||||||
# Hook direnv into fish
|
fisher install decors/fish-colored-man
|
||||||
tee ~/.config/fish/conf.d/direnv.fish > /dev/null <<EOF
|
fisher install edc/bass
|
||||||
direnv hook fish | source
|
fisher install jorgebucaran/autopair.fish
|
||||||
EOF
|
fisher install nickeb96/puffer-fish
|
||||||
|
fisher install PatrickF1/fzf.fish
|
||||||
# Hook starship into fish
|
"
|
||||||
tee ~/.config/fish/conf.d/starship.fish > /dev/null <<EOF
|
|
||||||
starship init fish | source
|
|
||||||
EOF
|
|
||||||
|
|
||||||
# Silence fish prompt
|
|
||||||
tee ~/.config/fish/conf.d/fish_greeting.fish > /dev/null <<EOF
|
|
||||||
function fish_greeting
|
|
||||||
echo (set_color yellow)"Press [enter] to clear the direnv error"
|
|
||||||
end
|
|
||||||
EOF
|
|
||||||
|
|
||||||
# Setup fisher plugin manager for fish
|
|
||||||
/usr/bin/fish -c "curl -sL https://git.io/fisher | source && fisher install jorgebucaran/fisher"
|
|
||||||
/usr/bin/fish -c "fisher install decors/fish-colored-man"
|
|
||||||
/usr/bin/fish -c "fisher install edc/bass"
|
|
||||||
/usr/bin/fish -c "fisher install jorgebucaran/autopair.fish"
|
|
||||||
/usr/bin/fish -c "fisher install nickeb96/puffer-fish"
|
|
||||||
|
|
||||||
# Setup CLI tools autocompletions for fish
|
|
||||||
for tool in cilium flux helm k9s kubectl kustomize talhelper talosctl; do
|
|
||||||
$tool completion fish > ~/.config/fish/completions/$tool.fish
|
|
||||||
done
|
|
||||||
gh completion --shell fish > ~/.config/fish/completions/gh.fish
|
|
||||||
k0sctl completion --shell fish > ~/.config/fish/completions/k0sctl.fish
|
|
||||||
stern --completion fish > ~/.config/fish/completions/stern.fish
|
|
||||||
yq shell-completion fish > ~/.config/fish/completions/yq.fish
|
|
||||||
|
|
||||||
# Create/update virtual environment
|
# Create/update virtual environment
|
||||||
if ! grep -q "venv /workspaces/" .venv/pyvenv.cfg; then
|
if ! grep -q "venv /workspaces/" .venv/pyvenv.cfg; then
|
||||||
|
|||||||
Reference in new issue
Block a user