My personal dotfiles and workstation setup, covering macOS and Gentoo. The
goal is a fully automated, idempotent, version-controlled environment.
The repository has two halves, and both are needed to bring up a machine:
| Tool | Scope | |
|---|---|---|
ansible/ |
Ansible | System provisioning: bootloader, portage, system packages, services, display manager |
nix/ |
home-manager | User environment: dotfiles, user packages, application configuration |
Ansible installs Nix itself, then home-manager takes over everything inside
$HOME. See nix/README.md for the home-manager side.
- Platforms: macOS and Gentoo.
- Shell: Zsh, Starship, Zoxide.
- Terminals: Alacritty, Kitty, Ghostty.
- Window Managers: Hyprland (Linux), AeroSpace (macOS).
- Editors: Neovim (LazyVim), Doom Emacs, VS Code, IntelliJ IDEA.
- Tools: Git, Tmux, Nix, Topgrade, Flatpak, Yazi.
- Input Methods: Rime.
- Networking: dae (Gentoo), configured from SOPS-encrypted secrets.
git,make,python(Ansible runs on Python).sopsand an age/SSH key listed in.sops.yaml, if you need to read or edit the encrypted secrets.
The Makefile detects the host OS (macOS or Gentoo) and selects the matching
Ansible inventory. If it cannot identify the host it fails with a message
rather than guessing.
-
Clone the repository:
git clone https://github.com/centsent/dotfiles.git cd dotfiles -
Provision the system:
make gentoo # or: make macos -
Apply the user environment:
cd nix home-manager switch --flake .#gentoo # or .#macosx
Any target name that is not a defined rule is passed through to Ansible as a tag, which gives per-role control:
make grub # only the grub tasks
make greetd # only the greetd tasks
make flatpak # only the flatpak tasksOther targets:
make install # both playbooks
make edit # open the SOPS-encrypted secrets
make INVENTORY_FILE=hosts_gentoo … # override host detection*.yml: Top-level playbooks (dotfiles.yml,macos.yml,gentoo.yml) defining the high-level execution flow.hosts_*: Inventory file per environment (hosts_macos,hosts_gentoo), selected automatically by the Makefile.group_vars/: Variables per inventory group — e.g.group_vars/macosholds the Homebrew package list,group_vars/all/secrets.sops.yamlthe encrypted secrets.roles/:macos/gentoo: meta-roles listing the dependencies for each OS.- Application roles (
greetd,grub,portage,dae, …): self-contained, one concern each.
.github/workflows/ci.yml runs on every push:
yamllint, ansible-lint and --syntax-check over the Ansible tree; nix fmt --check, nix flake check and an explicit evaluation of both
homeConfigurations; and a check that the secrets file is actually encrypted.