- main-setup.sh: sudo/root preflight for fresh Debian installs; offer distro-agnostic 03-dotnet-setup.sh on all supported distros - 01-package-install.sh: Debian package renames (bind9-dnsutils), batcat symlink, libvirt/QEMU stack; vendor repos for gh/terraform/kubectl + k9s/minikube binaries (not in Debian main); keep dnf path for Fedora - 02-dev-tools-setup.sh: PEP 668 fallback for pynvim pip install - 03-fedora-dotnet-setup.sh -> 03-dotnet-setup.sh: .NET SDK via official dotnet-install.sh (no MS repo), PostgreSQL + Podman/podman-docker - zshrc: purge dead oh-my-zsh references (prompt is Oh-My-Posh) - README: Debian 13 first-class; docs: record decisions + status
9.4 KiB
9.4 KiB
Debian 13 ("trixie") Migration Plan
Goal: make this dotfiles repo fully suited for Debian 13 (trixie) so a fresh Debian install can be brought up to the same state as the current Fedora setup.
Working branch: debian-13 (base: master).
Status: implemented on this branch (see
git logondebian-13). Recorded decisions below.
Decisions (user-confirmed)
- Container runtime: Podman (
podman,podman-compose,podman-dockershim) — no Docker CE / moby-engine. - VS Code: keep the Flatpak install (
com.visualstudio.code); no MS apt/rpm repo for the editor. - .NET install: official
dotnet-install.sh(channelSTS, overridable viaDOTNET_CHANNEL) — no Microsoft vendor repo. - oh-my-zsh: purge its remnants from
zshrc(now plain zsh + Oh-My-Posh). - Scope: full rework applied to
main-setup.shand allscripts/*.sh,zshrc,README.md.
1. Summary of what changes
The repo is mostly distro-agnostic already (shell rc files, aliases, nvim via NvChad + Mason, Flatpak list, GitHub-downloaded dev tools). The Fedora coupling is concentrated in:
- Package manager + detection (
main-setup.sh, scripts 00/01) — mostly works for Debian already since detection returnsdebian→apt, but package names and repos differ. - Fedora-only .NET script (
03-fedora-dotnet-setup.sh) — needs a distro-agnostic (or Debian-specific) counterpart. - README + comments referencing Fedora-only steps/groups.
- Several Debian 13 gotchas (PEP 668 pip,
dnsutils→bind9-dnsutils,bat→batcat, missing upstream-only tools likekubectl/gh/terraform/minikube/k9s,sudonot always present, Microsoft repo for trixie).
2. Debian 13 facts that drive the changes
| Topic | Fedora behavior | Debian 13 (trixie) behavior |
|---|---|---|
| Package manager | dnf / rpm -q |
apt / dpkg-query (already handled) |
sudo |
preinstalled | not always installed on fresh installs |
| pip | system pip installs OK | PEP 668 blocks pip install --user (externally-managed-environment) |
dnsutils |
bind-utils |
package renamed to bind9-dnsutils (trixie) |
bat |
binary bat |
package ships batcat, needs bat symlink/alias |
fd-find |
binary fd |
binary fdfind, script already symlinks |
.NET |
MS repo for Fedora + moby-engine |
MS repo for debian/13 (packages-microsoft-prod.deb) or dotnet-install.sh |
| Docker | moby-engine |
docker.io (Debian) or docker-ce (Docker repo) |
| PostgreSQL | needs postgresql-setup --initdb |
cluster auto-created by package scripts |
kubectl/gh/terraform/minikube/k9s |
in COPR/DNF repos | not in Debian main → add upstream apt repos or download .deb |
chsh |
util-linux-user package |
in base util-linux; needs password/sudo to change shell |
| libvirt group | libvirt |
same libvirt group (add user) |
| default shell | zsh setup via OhMyZsh scripts | zsh not default; needs chsh after install |
3. File-by-file plan
main-setup.sh
- Keep existing
detect_linux_distro()— already returnsdebianfor trixie (ID=debian). Verifysudopresent; if missing, warn tosu -/installsudofirst (or auto-detect root). - Replace the Fedora-only prompt for
03-fedora-dotnet-setup.shwith a distro-agnostic.NETprompt (new03-dotnet-setup.sh), OR gate on bothfedoraanddebian. - Consider exporting
DEBIAN_CODENAME/DISTRO_VERSION(from/etc/os-release) for downstream repo URLs.
scripts/00-system-prep.sh
apt update && apt upgradepath already correct. Add optional: installsudo,curl,gnupg,ca-certificates,software-properties-common/apt-transport-httpsprerequisites early.- (Optional) enable
contrib/non-free-firmwarecomponents in/etc/apt/sources.list.d/debian.sources— needed for some firmware/tools.
scripts/01-package-install.sh
- Split
BASE_PACKAGE_LISTinto truly-common + distro lists; on Debian drop anything not in trixie and add Debian equivalents. - Rename fixes (Debian branch of
DISTRO_SPECIFIC_PACKAGES):dnsutils→bind9-dnsutils- add
bathandling: after install,ln -sf /usr/bin/batcat /usr/local/bin/bat - add
sudo,ca-certificates,gnupg,curl(ensure present) - add
libvirt-daemon-system,virtinst,qemu-kvm,bridge-utilsfor virt-manager - add
zshpost:chsh -s /usr/bin/zsh(or instruct) python3-pipstays, but flag PEP 668 handling (see 02)docker.io+docker-composeor wire Docker CE repo (defer to decision in §4)
- Upstream repo tools not in Debian main — install in this script or a new
05-script:gh→ GitHub CLI apt repo (https://cli.github.com/packages)terraform→ HashiCorp apt repokubectl→ Kubernetes apt repo (pkgs.k8s.io)k9s,minikube→ GitHub.debreleases (minikube official.debexists)
- Flatpak list unchanged (distro-agnostic). Note VS Code Flatpak vs MS repo decision in §4.
scripts/02-dev-tools-setup.sh
- pynvim PEP 668 fix: replace
pip install --user pynvimwithpython3 -m pip install --user --break-system-packages pynvim, or (cleaner) install into NvChad's venv, or notepipx. - Rest is GitHub-download based → distro-agnostic; verify
unzip,tar,wgetpresent. divealready handles.debviadpkg -ion apt — good.- Go/Rust/Nerd Font/Oh-My-Posh/Helm/kubectx/stern/trivy/AWS — no changes needed.
scripts/03-fedora-dotnet-setup.sh → split/generalize
- Rename to
03-dotnet-setup.shand branch by$PACKAGE_MANAGER:- Fedora: keep existing RPM/MS-repo path.
- Debian: add MS Debian repo
https://packages.microsoft.com/config/debian/13/packages-microsoft-prod.deb(verify trixie support; fall back todotnet-install.shif repo is unavailable for trixie) thenapt install dotnet-sdk-10.0(or 8/9 fallback loop like Fedora). - Alternatively use official
dotnet-install.shfor both — fully distro-agnostic, no repo dependency.
- Replace Fedora-specific db/container section with Debian equivalents:
- PostgreSQL:
apt install postgresql(cluster auto-init — removepostgresql-setup --initdbstep for Debian; justsystemctl enable --now postgresql). - Docker:
docker.io+docker-compose+ add user todockergroup, or Docker CE repo.
- PostgreSQL:
- Update
main-setup.shgate accordingly.
scripts/04-config-symlinks.sh
- No functional changes needed (pure symlinking). Optionally handle
~/.bash_aliases(Debian's default bashrc sources it) or leave as-is sincebashrcsourcesaliases.bashdirectly.
Shell rc files (bashrc, zshrc, aliases)
- Already distro-agnostic (PATH for
/usr/local/go,~/.local/bin, cargo, nvm). No Fedora-specific bits. - Note:
zshrcstill references oh-my-zsh ($ZSH/oh-my-zsh.sh,plugins=(git)) but no script installs it anymore (repo moved to Oh-My-Posh). On a fresh Debian this will fail silently. Decide: purge oh-my-zsh remnants or restore its install step. Recommend purging on this branch. - Ensure
~/.fzf.zsh/~/.fzf.bashgeneration (fzf --zsh/--bash) or skip gracefully (already guarded).
README.md
- Update "Supported Distributions" / feature matrix to reflect Debian 13 = first-class, Fedora optional.
- Rename "Fedora-Specific (.NET)" section → ".NET Development" with per-distro notes.
- Update post-install steps (group names
docker,libvirt; remove Fedora-only log-out note if not applicable; add PEP 668 note). - Update file listing for
03-*.shrenames.
4. Open decisions (need your input)
- Container runtime on Debian:
docker.io(Debian pkg) vs official Docker CE repo vs Podman (since Fedora used Podman Desktop +moby-engine)? This repo mixes docker aliases and Podman Desktop flatpak. - VS Code source: keep Flatpak
com.visualstudio.code(already in list) or switch to MS apt repo.deblike Fedora's RPM setup did? - .NET SDK version to target: repo tries 8.0 → 9.0 on Fedora; pick a default for Debian (e.g. SDK 10 on trixie) or keep the fallback loop.
- oh-my-zsh remnants in
zshrc: purge (recommended) or keep? - Scope of this branch: full rework of all scripts, or a lighter pass (fix names + PEP 668 + .NET script) to validate on a live trixie box first?
5. Suggested execution order
- Do the cheap, high-confidence fixes:
main-setup.shgating +.NETprompt01-package-install.shDebian package renames (bind9-dnsutils,batsymlink, prerequisites, virt stack)02-dev-tools-setup.shPEP 668 pynvim fix
- Rename/generalize
03-fedora-dotnet-setup.sh→03-dotnet-setup.sh. - Add upstream repo/bootstrap logic for
gh,terraform,kubectl,minikube,k9s. - Purge oh-my-zsh remnants from
zshrc. - Update
README.md. - Test end-to-end on a Debian 13 VM (or real install) before merging to
master.
6. Verification checklist (on Debian 13)
# sanity
cat /etc/os-release # expect ID=debian, VERSION_CODENAME=trixie
./main-setup.sh # expect "Using Package Manager: apt"
bat --version # symlink check
fd --version # symlink check
dig example.com # bind9-dnsutils
python3 -m pip install --user pynvim # must not hit PEP 668 error
dotnet --list-sdks
docker ps # group membership
virsh list # libvirt group