Add zsh + oh-my-zsh, set default shell per distro family
- Add zsh to SYSTEM_PACKAGES - Detect RHEL-family vs Debian-family from /etc/os-release ID/ID_LIKE (falls back to PKG_MGR if os-release is unreadable) - ensure_zsh_default sets zsh as the invoking user's login shell after system install: usermod -s on RHEL-family (chsh under default authselect refuses other-user changes), chsh -s elsewhere; SUDO_USER is preferred so sudo invocations target the real user - Add oh-my-zsh to CUSTOM_PACKAGES; the installer runs the official unattended script (requires zsh + git, which are already installed by this point) and rewrites ZSH_THEME to "gnzh" in ~/.zshrc - As a final step, run 'zsh -c "source ~/.zshrc"' to validate the rc file (the user's interactive shell is unaffected — they need a new terminal to pick up the new default shell)
This commit is contained in:
@@ -52,6 +52,7 @@ SYSTEM_PACKAGES: list[str] = [
|
||||
"wireshark",
|
||||
"yt-dlp",
|
||||
"zoom",
|
||||
"zsh",
|
||||
"bzip2",
|
||||
"bzip2-devel",
|
||||
"gdbm-libs",
|
||||
@@ -111,4 +112,5 @@ CUSTOM_PACKAGES: list[dict] = [
|
||||
{"name": "nvm"},
|
||||
{"name": "pyenv"},
|
||||
{"name": "pip"},
|
||||
{"name": "oh-my-zsh"},
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user