feat: devcontainer properly hooks starship and direnv now
Signed-off-by: Devin Buhl <devin@buhl.casa>
This commit is contained in:
5 files changed
+15
-13
No files matched your search
@@ -35,11 +35,8 @@ for installer_path in \
|
|||||||
"go-task/task!" \
|
"go-task/task!" \
|
||||||
"k0sproject/k0sctl!" \
|
"k0sproject/k0sctl!" \
|
||||||
"stern/stern!" \
|
"stern/stern!" \
|
||||||
|
"siderolabs/talos!!?as=talosctl" \
|
||||||
"yannh/kubeconform!"
|
"yannh/kubeconform!"
|
||||||
do
|
do
|
||||||
curl -fsSL "https://i.jpillora.com/${installer_path}" | bash
|
curl -fsSL "https://i.jpillora.com/${installer_path}" | bash
|
||||||
done
|
done
|
||||||
|
|
||||||
curl -fsSL -o /usr/local/bin/talosctl \
|
|
||||||
"https://github.com/siderolabs/talos/releases/latest/download/talosctl-linux-${ARCH}"
|
|
||||||
chmod +x /usr/local/bin/talosctl
|
|
||||||
@@ -3,6 +3,6 @@
|
|||||||
"name": "Flux Cluster Template",
|
"name": "Flux Cluster Template",
|
||||||
"image": "ghcr.io/onedr0p/flux-cluster-template/devcontainer:base",
|
"image": "ghcr.io/onedr0p/flux-cluster-template/devcontainer:base",
|
||||||
"postCreateCommand": {
|
"postCreateCommand": {
|
||||||
"deps": "${containerWorkspaceFolder}/.devcontainer/postCreateCommand.sh"
|
"deps": "bash ${containerWorkspaceFolder}/.devcontainer/postCreateCommand.sh"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,12 +1,17 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
set -e
|
||||||
|
set -o noglob
|
||||||
|
|
||||||
|
# Create the fish configuration directory
|
||||||
|
mkdir -p ~/.config/fish/conf.d
|
||||||
|
|
||||||
# Hook direnv into fish
|
# Hook direnv into fish
|
||||||
cat << EOF > ~/.config/fish/conf.d/direnv.fish
|
tee ~/.config/fish/conf.d/direnv.fish > /dev/null <<EOF
|
||||||
direnv hook fish | source
|
direnv hook fish | source
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
# Hook starship into fish
|
# Hook starship into fish
|
||||||
cat << EOF > ~/.config/fish/conf.d/starship.fish
|
tee ~/.config/fish/conf.d/starship.fish > /dev/null <<EOF
|
||||||
starship init fish | source
|
starship init fish | source
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
|||||||
@@ -9,12 +9,12 @@ set -o noglob
|
|||||||
mkdir -p /var/lib/k0s/manifests/kube-vip
|
mkdir -p /var/lib/k0s/manifests/kube-vip
|
||||||
|
|
||||||
# Create kube-vip rbac
|
# Create kube-vip rbac
|
||||||
cat <<EOF > /var/lib/k0s/manifests/kube-vip/kube-vip-rbac.yaml
|
tee /var/lib/k0s/manifests/kube-vip/kube-vip-rbac.yaml > /dev/null <<EOF
|
||||||
#% include 'partials/kube-vip-rbac.partial.yaml.j2' %#
|
#% include 'partials/kube-vip-rbac.partial.yaml.j2' %#
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
# Create kube-vip daemonset
|
# Create kube-vip daemonset
|
||||||
cat <<EOF > /var/lib/k0s/manifests/kube-vip/kube-vip-ds.yaml
|
tee /var/lib/k0s/manifests/kube-vip/kube-vip-ds.yaml > /dev/null <<EOF
|
||||||
#% include 'partials/kube-vip-ds.partial.yaml.j2' %#
|
#% include 'partials/kube-vip-ds.partial.yaml.j2' %#
|
||||||
EOF
|
EOF
|
||||||
#% endif %#
|
#% endif %#
|
||||||
@@ -34,7 +34,7 @@ apt-get install -y --no-install-recommends \
|
|||||||
# Update DNS
|
# Update DNS
|
||||||
chattr -i /etc/resolv.conf
|
chattr -i /etc/resolv.conf
|
||||||
rm -f /etc/resolv.conf
|
rm -f /etc/resolv.conf
|
||||||
cat <<EOF > /etc/resolv.conf
|
tee /etc/resolv.conf > /dev/null <<EOF
|
||||||
search .
|
search .
|
||||||
nameserver #{ bootstrap_dns_server }#
|
nameserver #{ bootstrap_dns_server }#
|
||||||
EOF
|
EOF
|
||||||
@@ -50,7 +50,7 @@ done
|
|||||||
systemctl restart systemd-modules-load.service
|
systemctl restart systemd-modules-load.service
|
||||||
|
|
||||||
# Sysctls
|
# Sysctls
|
||||||
cat <<EOF > /etc/sysctl.d/99-kubernetes.conf
|
tee /etc/sysctl.d/99-kubernetes.conf > /dev/null <<EOF
|
||||||
fs.inotify.max_queued_events = 65536
|
fs.inotify.max_queued_events = 65536
|
||||||
fs.inotify.max_user_watches = 524288
|
fs.inotify.max_user_watches = 524288
|
||||||
fs.inotify.max_user_instances = 8192
|
fs.inotify.max_user_instances = 8192
|
||||||
@@ -66,14 +66,14 @@ if systemctl is-enabled apparmor.service; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Neofetch
|
# Neofetch
|
||||||
cat <<EOF > /etc/profile.d/neofetch.sh
|
tee /etc/profile.d/neofetch.sh > /dev/null <<EOF
|
||||||
neofetch --config none
|
neofetch --config none
|
||||||
EOF
|
EOF
|
||||||
chmod 755 /etc/profile.d/neofetch.sh
|
chmod 755 /etc/profile.d/neofetch.sh
|
||||||
|
|
||||||
# Create containerd config
|
# Create containerd config
|
||||||
mkdir -p /etc/k0s/containerd.d
|
mkdir -p /etc/k0s/containerd.d
|
||||||
cat <<EOF > /etc/k0s/containerd.d/default.toml
|
tee /etc/k0s/containerd.d/default.toml > /dev/null <<EOF
|
||||||
[plugins."io.containerd.grpc.v1.cri"]
|
[plugins."io.containerd.grpc.v1.cri"]
|
||||||
enable_unprivileged_ports = true
|
enable_unprivileged_ports = true
|
||||||
enable_unprivileged_icmp = true
|
enable_unprivileged_icmp = true
|
||||||
|
|||||||
Reference in new issue
Block a user