Make server dotfiles generic: single servers/ folder instead of per-host
Consolidated server/<host>/ into one generic servers/ set applied to any host. Baseline chosen as the superset of the per-host configs: .zshrc (agnoster + kubectl), identical .vimrc, standard .bashrc, fuller htoprc, and the shared neofetch config. install.sh now deploys servers/ unconditionally (no hostname matching); removed the --host flag. README updated accordingly.
This commit is contained in:
49
README.md
49
README.md
@@ -2,45 +2,54 @@
|
||||
|
||||
Personal and server dotfiles. Kept in two areas:
|
||||
|
||||
- `server/` — configs pulled from the homelab servers (iris, vega, nebula, nexus)
|
||||
- (personal dotfiles live at the repo root, kept separate from `server/`)
|
||||
- `servers/` — a single, generic set of server dotfiles (zsh, vim, bash,
|
||||
htop, neofetch) applied to any homelab server, rather than one folder per host
|
||||
- (personal dotfiles live at the repo root, kept separate from `servers/`)
|
||||
|
||||
## Layout
|
||||
|
||||
```
|
||||
server/<host>/
|
||||
.zshrc zsh config (oh-my-zsh, agnoster theme)
|
||||
servers/
|
||||
.zshrc zsh config (oh-my-zsh, agnoster theme, kubectl plugin)
|
||||
.vimrc vim config (dracula + lightline + Vundle)
|
||||
.bashrc bash config (where present)
|
||||
.bashrc bash config (standard Debian default)
|
||||
.config/htop/htoprc htop config
|
||||
.config/neofetch/config.conf neofetch config (where present)
|
||||
.config/neofetch/config.conf neofetch config
|
||||
```
|
||||
|
||||
These are the common baseline shared across the homelab hosts (iris, vega,
|
||||
nebula, nexus, ...). They were consolidated from the per-host configs into one
|
||||
generic set so a single `./install.sh` works on any server.
|
||||
|
||||
## What is NOT included (and why)
|
||||
|
||||
These are intentionally excluded from the repo:
|
||||
|
||||
- `.ssh/`, `.kube/`, `.docker/`, `.ansible/` — secrets / infra credentials
|
||||
- `.zsh_history`, `.viminfo`, `.zcompdump*`, `.netrwhist` — ephemeral caches
|
||||
- `.oh-my-zsh/` — upstream framework (25–32M); reinstall instead of vendoring
|
||||
- `.oh-my-zsh/` — upstream framework; reinstall instead of vendoring
|
||||
- `.vim/bundle/*` — Vundle-managed third-party plugins
|
||||
- `backup.sh`, `clean.sh`, `crontab.bak*`, `talosctl`, `places` — local utility
|
||||
scripts / binaries specific to each host
|
||||
|
||||
## Reinstalling the frameworks on a fresh server
|
||||
## Installing on a fresh server
|
||||
|
||||
```sh
|
||||
# oh-my-zsh (theme used: agnoster)
|
||||
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
|
||||
|
||||
# zsh-autosuggestions plugin
|
||||
git clone https://github.com/zsh-users/zsh-autosuggestions \
|
||||
${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
|
||||
|
||||
# vim plugins (dracula, lightline, vim-gitbranch) via Vundle
|
||||
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
|
||||
vim +PluginInstall +qall
|
||||
git clone git@git.ivanch.me:ivanch/dotfiles.git
|
||||
cd dotfiles
|
||||
./install.sh # detects Debian/Alpine, installs pkgs + oh-my-zsh,
|
||||
# deploys servers/ and installs Vim plugins
|
||||
# optional: ./install.sh --chsh (set login shell to zsh)
|
||||
# ./install.sh --dry-run (preview only)
|
||||
```
|
||||
|
||||
After cloning `server/<host>/` contents into `/root`, source `.zshrc` (or
|
||||
re-login) and run `:PluginInstall` once in vim.
|
||||
The installer:
|
||||
|
||||
1. Detects the OS / package manager (`apt` on Debian, `apk` on Alpine) and
|
||||
installs `git curl zsh vim` plus `htop` and `fzf`.
|
||||
2. Installs oh-my-zsh (unattended) + the `zsh-autosuggestions` plugin.
|
||||
3. Copies the `servers/` dotfiles into `$HOME`.
|
||||
4. Clones the Vim plugins declared in `.vimrc` (dracula, lightline,
|
||||
vim-gitbranch) directly — no interactive step required.
|
||||
|
||||
It is safe to re-run; every step is idempotent.
|
||||
|
||||
Reference in New Issue
Block a user