- 00-system-prep.sh: bootstrap sudo when run as root; on Debian enable contrib/non-free-firmware (SKIP_NONFREE to opt out) + install needrestart - scripts/verify-debian.sh: non-destructive post-install sanity checker (exit 0/1) covering OS, tools, Debian renames, upstream tooling, .NET/Podman/Postgres, groups, flatpak, dotfile symlinks - 01-package-install.sh: auto-detect current Kubernetes minor from upstream (fallback v1.36, override K8S_MINOR) instead of stale v1.32 pin - fix shellcheck findings (SC2155, SC2207, SC2088); all scripts clean at warning severity - docs: fold decisions/status into plan; README lists new tools
136 lines
4.9 KiB
Markdown
136 lines
4.9 KiB
Markdown
# Fresh Install
|
|
|
|
This is a collection of scripts and dotfiles I use when setting up a fresh Linux installation.
|
|
|
|
## Quick Start
|
|
|
|
Run the main setup script to install software, configure development tools, and symlink dotfiles:
|
|
|
|
```bash
|
|
./main-setup.sh
|
|
```
|
|
|
|
The script will automatically detect your Linux distribution (Debian 13 "trixie" is the primary target; Ubuntu and Fedora also work) and use the appropriate package manager (`apt` or `dnf`).
|
|
|
|
## What Gets Installed
|
|
|
|
### Core Packages (distro packages)
|
|
- Development tools: `git`, `curl`, `wget`, `ripgrep`, `fd-find`, `bat`, `eza`
|
|
- System utilities: `btop`, `zsh`, `tmux`, `fzf`, `zoxide`, `flatpak`
|
|
- Virtualization (KVM): `virt-manager` + libvirt/QEMU stack
|
|
- Python: `python3`, `python3-pip`
|
|
- Networking: `nmap`, `mtr`, `tcpdump`, `socat`, `whois`, `iperf3`, `traceroute`, `bind9-dnsutils`
|
|
- HTTP: `httpie`
|
|
- DevOps helpers: `ansible`, `direnv`, `jq`, `tldr`, `unzip`
|
|
|
|
### Upstream Tooling (installed by 01)
|
|
`gh` (GitHub CLI), `terraform`, `kubectl`, `k9s` and `minikube` are **not packaged in Debian**, so `01-package-install.sh` adds the official vendor apt repositories (GitHub CLI, HashiCorp, `pkgs.k8s.io`) and installs `k9s`/`minikube` from upstream binaries. On Fedora these are a best-effort `dnf` install (usually COPR/manual).
|
|
|
|
### Development Environment (02)
|
|
- **Neovim** (latest from GitHub, installed to `/opt/nvim`)
|
|
- **Hack Nerd Font** for terminals
|
|
- **Go** toolchain (`/usr/local/go`)
|
|
- **Rust** toolchain via rustup
|
|
- **Oh-My-Posh** prompt (`~/.local/bin`)
|
|
- **Helm**, **kubectx/kubens**, **stern**, **dive**, **trivy**, **AWS CLI v2**
|
|
|
|
### .NET / Backend Services (03, optional)
|
|
Distro-agnostic .NET development environment:
|
|
- **.NET SDK** via the official `dotnet-install.sh` (no vendor repository needed)
|
|
- **PostgreSQL** server and tools
|
|
- **Podman** + `podman-compose` + `podman-docker` (Docker-CLI-compatible containers)
|
|
- VS Code is installed as a **Flatpak** (`com.visualstudio.code`)
|
|
|
|
### Flatpak Applications
|
|
- Bolt, Bitwarden, Discord, Teams for Linux, Flatseal
|
|
- Steam, ProtonUp-Qt (pupgui2), VLC
|
|
- Visual Studio Code, Podman Desktop
|
|
- Signal, Thunderbird
|
|
|
|
## Modular Architecture
|
|
|
|
The setup is broken down into focused scripts:
|
|
|
|
- `00-system-prep.sh` - System updates, `sudo` bootstrap, Debian `contrib`/`non-free-firmware` + `needrestart`, Flathub setup
|
|
- `01-package-install.sh` - Core packages, upstream tooling, and Flatpak apps
|
|
- `02-dev-tools-setup.sh` - Development tools (Neovim, Go, Rust, Oh-My-Posh, Helm, kubectx, stern, dive, trivy, AWS CLI)
|
|
- `03-dotnet-setup.sh` - .NET SDK + PostgreSQL + Podman (distro-agnostic)
|
|
- `04-config-symlinks.sh` - Dotfile symlinking
|
|
- `verify-debian.sh` - Post-install sanity checker (run manually, no root needed)
|
|
|
|
You can run individual scripts if you only need specific components.
|
|
|
|
## Dotfiles
|
|
|
|
The following configuration files will be symlinked to your home directory:
|
|
|
|
- `.vimrc` & `.vim/` - Vim/Neovim configuration
|
|
- `.zshrc` & `.zsh/` - Zsh shell configuration
|
|
- `.gitconfig` - Git configuration (**edit with your credentials**)
|
|
- `.gitignore` - Global Git ignore patterns
|
|
- `.agignore` - Silver Searcher ignore patterns
|
|
- `.aliases` - Shell aliases (from `aliases.zsh`)
|
|
- `.gitmessage` - Git commit template (from `commit-conventions.txt`)
|
|
|
|
### Git Configuration
|
|
|
|
**Important:** Edit `gitconfig` and replace my credentials with yours before running the setup.
|
|
|
|
### Vim/Neovim Setup
|
|
|
|
I use Neovim with vim-plug for plugin management. If you're using regular Vim, you may need to:
|
|
1. Remove Neovim-specific plugins from `.vimrc`
|
|
2. Run `:PlugClean` to remove plugin directories
|
|
3. Run `:PlugInstall` to reinstall compatible plugins
|
|
|
|
## Post-Installation Tasks
|
|
|
|
After running the setup, remember to:
|
|
|
|
1. **Configure Git with your details:**
|
|
```bash
|
|
git config --global user.name "Your Name"
|
|
git config --global user.email "your.email@example.com"
|
|
```
|
|
|
|
2. **Generate SSH key:**
|
|
```bash
|
|
ssh-keygen -t ed25519 -C ${USER}@$(hostname --fqdn)
|
|
```
|
|
|
|
3. **Set zsh as your login shell:**
|
|
```bash
|
|
chsh -s /usr/bin/zsh
|
|
```
|
|
|
|
4. **Add yourself to virtualization groups** (log out/in afterward):
|
|
```bash
|
|
sudo usermod -aG libvirt,kvm $USER
|
|
```
|
|
|
|
5. **(Optional) enable the rootless Podman API socket:**
|
|
```bash
|
|
systemctl --user enable --now podman.socket
|
|
```
|
|
|
|
6. **Install VS Code extensions:**
|
|
- C# Dev Kit
|
|
- GitLens
|
|
- Prettier
|
|
- NuGet Package Manager GUI
|
|
|
|
## Supported Distributions
|
|
|
|
- **Debian 13 "trixie"** (primary target — full setup incl. upstream tooling, .NET, and backend services)
|
|
- **Ubuntu / Pop!_OS** (apt; core + development tools)
|
|
- **Fedora** (dnf; core + development tools, best-effort upstream tooling)
|
|
|
|
## Customization
|
|
|
|
Feel free to fork this repository and modify the scripts/dotfiles to suit your needs. The modular structure makes it easy to add, remove, or modify specific components.
|
|
|
|
## Legacy
|
|
|
|
The original monolithic `post_install.sh` script has been archived in `.archive/` for reference.
|
|
|