Updated install options.

Bootstrap - sets up the Desktop
Install   - sets up my software
scripts/  - specific software setups
This commit is contained in:
2026-05-06 10:25:33 +02:00
parent 60d7870095
commit 7ba67a2655
6 changed files with 301 additions and 61 deletions
+30
View File
@@ -0,0 +1,30 @@
#!/bin/bash
# ---------------------------------------------------------------------------------
# Docker install recipe
# ---------------------------------------------------------------------------------
set -e
echo "🐳 Removing old Docker packages if present..."
sudo apt-get remove -y docker docker-engine docker.io containerd runc 2>/dev/null || true
echo "🔑 Adding Docker signing key..."
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc
echo "📦 Adding Docker repository..."
bash -c 'echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/debian $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null'
echo "📦 Installing Docker..."
sudo apt-get update
sudo apt-get install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
echo "👤 Adding current user to docker group..."
sudo groupadd docker 2>/dev/null || true
sudo usermod -aG docker $USER
echo ""
echo "✅ Docker install complete."
echo " Log out and back in for group changes to take effect."
+77
View File
@@ -0,0 +1,77 @@
#!/bin/bash
# ---------------------------------------------------------------------------------
# Golang install recipe
# Fetches the latest stable Go release, installs to /usr/local/go,
# then installs go-based CLI tools.
# ---------------------------------------------------------------------------------
set -e
# ---------------------------------------------------------------------------------
# Detect architecture
# ---------------------------------------------------------------------------------
ARCH=$(dpkg --print-architecture)
case "$ARCH" in
amd64) GO_ARCH="amd64" ;;
arm64) GO_ARCH="arm64" ;;
*)
echo "❌ Unsupported architecture: $ARCH"
exit 1
;;
esac
# ---------------------------------------------------------------------------------
# Fetch latest stable Go version
# ---------------------------------------------------------------------------------
echo "🔍 Fetching latest stable Go version..."
GO_VERSION=$(curl -fsSL "https://go.dev/dl/?mode=json" | grep -o '"version":"go[^"]*"' | head -1 | grep -o 'go[0-9.]*')
if [ -z "$GO_VERSION" ]; then
echo "❌ Failed to fetch latest Go version."
exit 1
fi
echo "✅ Latest Go version: $GO_VERSION"
# ---------------------------------------------------------------------------------
# Download and install
# ---------------------------------------------------------------------------------
TARBALL="${GO_VERSION}.linux-${GO_ARCH}.tar.gz"
DOWNLOAD_URL="https://go.dev/dl/${TARBALL}"
echo "📦 Downloading $TARBALL..."
curl -fsSL "$DOWNLOAD_URL" -o "/tmp/${TARBALL}"
echo "📂 Installing to /usr/local/go..."
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf "/tmp/${TARBALL}"
rm "/tmp/${TARBALL}"
# ---------------------------------------------------------------------------------
# Verify install
# ---------------------------------------------------------------------------------
export PATH=$PATH:/usr/local/go/bin
echo "🔍 Verifying Go install..."
/usr/local/go/bin/go version
# ---------------------------------------------------------------------------------
# Install Go-based CLI tools
# ---------------------------------------------------------------------------------
echo ""
echo "📦 Installing Go-based CLI tools..."
echo " → gopls"
go install golang.org/x/tools/gopls@latest
echo " → lazydocker"
go install github.com/jesseduffield/lazydocker@latest
echo " → lf"
env CGO_ENABLED=0 go install -trimpath -ldflags="-s -w" github.com/gokcehan/lf@latest
echo ""
echo "✅ Golang setup complete."
echo " Restart your shell or run: source ~/.config/fish/config.fish"
+83
View File
@@ -0,0 +1,83 @@
#!/bin/bash
# ---------------------------------------------------------------------------------
# Kanata install recipe
# Downloads the latest Linux binary from GitHub, installs to ~/.local/bin,
# and sets up a systemd user service.
# ---------------------------------------------------------------------------------
set -e
INSTALL_DIR="$HOME/.local/bin"
CONFIG_DIR="$HOME/.config/kanata"
SERVICE_PATH="/lib/systemd/system/kanata.service"
BINARY_NAME="kanata"
# ---------------------------------------------------------------------------------
# Fetch latest release version from GitHub API
# ---------------------------------------------------------------------------------
echo "🔍 Fetching latest Kanata release..."
LATEST_VERSION=$(curl -fsSL "https://api.github.com/repos/jtroo/kanata/releases/latest" | grep '"tag_name"' | head -1 | grep -o 'v[0-9.]*')
if [ -z "$LATEST_VERSION" ]; then
echo "❌ Failed to fetch latest Kanata version."
exit 1
fi
echo "✅ Latest Kanata version: $LATEST_VERSION"
# ---------------------------------------------------------------------------------
# Download binary
# ---------------------------------------------------------------------------------
DOWNLOAD_URL="https://github.com/jtroo/kanata/releases/download/${LATEST_VERSION}/kanata_linux_x64"
echo "📦 Downloading kanata_linux_x64..."
mkdir -p "$INSTALL_DIR"
curl -fsSL "$DOWNLOAD_URL" -o "$INSTALL_DIR/$BINARY_NAME"
chmod +x "$INSTALL_DIR/$BINARY_NAME"
echo "✅ Installed: $INSTALL_DIR/$BINARY_NAME"
# ---------------------------------------------------------------------------------
# Verify a config file exists
# ---------------------------------------------------------------------------------
if [ ! -f "$CONFIG_DIR/kanata.kbd" ]; then
echo "⚠️ No config found at $CONFIG_DIR/kanata.kbd"
echo " Make sure your dotfiles are synced before enabling the service."
fi
# ---------------------------------------------------------------------------------
# Write systemd service file
# ---------------------------------------------------------------------------------
echo "⚙️ Writing systemd service to $SERVICE_PATH..."
sudo tee "$SERVICE_PATH" > /dev/null <<EOF
[Unit]
Description=Kanata keyboard remapper
Documentation=https://github.com/jtroo/kanata
[Service]
Type=simple
ExecStart=$INSTALL_DIR/$BINARY_NAME --cfg $CONFIG_DIR/kanata.kbd
Restart=never
[Install]
WantedBy=default.target
EOF
echo "✅ Service file written."
# ---------------------------------------------------------------------------------
# Enable and start the service
# ---------------------------------------------------------------------------------
echo "🚀 Enabling and starting kanata service..."
sudo systemctl daemon-reload
sudo systemctl enable kanata.service
sudo systemctl start kanata.service
echo ""
echo "✅ Kanata setup complete."
echo " Binary : $INSTALL_DIR/$BINARY_NAME"
echo " Config : $CONFIG_DIR/kanata.kbd"
echo " Service: systemctl status kanata"