The Gentoo OS-native layer β Portage, USE flags, source-based, over the shared Core.
Explore the docs Β»
View Demo
Β·
Report Bug
Β·
Request Feature
Table of Contents
dotfiles-Gentoo is the OS-native layer for Gentoo β the capstone of the
Linux set, and one node in a cross-platform dotfiles system. The shared Core
(zsh, tmux, Neovim, git, starship, mise) is authored once in
dotfiles-core and vendored under
core/ via git subtree, so a clone is self-contained. This repo adds only what
is genuinely Gentoo: Portage/emerge, full category/name atoms, USE flags, and
the source-build mitigations.
Gentoo is stamped from the dotfiles-Fedora
template per the porting matrix β the most educational and most
time-expensive of the set, since emerge compiles packages. The full docs
live on the documentation site.
The system is three layers, each building on the one below:
| Layer | Lives in | Owns |
|---|---|---|
| Core | dotfiles-core β vendored into every OS repo's core/ |
zsh, tmux, nvim, git, starship β identical everywhere |
| OS-native | dotfiles-{MacBook,Windows,Fedora,Arch,openSUSE,Alpine,Gentoo} (this repo among them) |
package manager, clipboard, paths |
| Role | dotfiles-Kali, dotfiles-Defense |
offensive / defensive tooling |
No new languages β this layer is shell and package config over Core's language stack.
An existing Gentoo system and Git, run as root or with sudo/doas
configured. Because emerge compiles from source, expect real build time β the
hub write-up covers the two biggest time-savers (the binhost and rust-bin).
git clone https://github.com/dotgibson/dotfiles-Gentoo ~/dotfiles-Gentoo
cd ~/dotfiles-Gentoo
./bootstrap.sh
exec zshcore/ is a vendored subtree and is already present in a clone β there is no
submodule step. bootstrap.sh is idempotent: it emerges the package list
(skipping and reporting any keyword-masked atom) and symlinks Core + the Gentoo
layer into place. Flags: --no-sync (skip the slow emerge --sync on re-runs),
--links-only (re-link without touching Portage).
Only what changes with the OS. The heavy lifting β the shell modules, editor, and prompt β comes from vendored Core; this repo owns the Gentoo specifics:
bootstrap.shβemergeprovision + Core/OS symlink wiring (idempotent)install/packages.txtβ Portage atoms (modern CLI stack)os/gentoo.zshβ clipboard + package-manager aliases β~/.config/zsh/os.zshgentoo/package.use.example,gentoo/package.accept_keywords.exampleβ USE-flag and keyword overrides to review and copy to/etc/portagecore/β vendored fromdotfiles-core(read-only here; edit upstream)
The things that actually bite on Gentoo β cutting build time (binhost +
rust-bin), USE flags, keyword masking, full atoms, and living with Portage
(@preserved-rebuild, dispatch-conf, gnews) β are written up on the hub,
alongside the per-distro porting matrix:
This is an OS-native layer, so the contribution rule is a boundary rule:
- Never hand-edit
core/. It is a vendored copy ofdotfiles-coreand is overwritten on the next sync. Fix shared config upstream indotfiles-core, runmake auditthere, thenmake syncfans it out here. - Keep changes genuinely Gentoo. If it would be identical on every distro, it belongs in Core; if it changes with the operator, it belongs in a role repo.
- Green the lint gate. This repo's CI runs shellcheck +
bash -n/zsh -non the repo-owned shell (the vendoredcore/is excluded β it is gated upstream).
Bugs and ideas: open an issue.
Distributed under the MIT License. See LICENSE for more information.
Garrett Allen - @gerrrrt - garrettallen2@gmail.com - LinkedIn
Project Link: dotgibson