mirror of
https://github.com/fscotto/infra.git
synced 2026-07-29 16:20:01 +00:00
Rimuove completamente i due host non più in uso dal playbook: - inventory: gruppi ubuntu_workstation, workstation_dev_ubuntu, workstation_host_windows e relative entry host - host_vars deadalus-ubuntu/deadalus-win e group_vars windows - play workstation_dev_ubuntu e workstation_host_windows in site.yml - ruolo profile_workstation_host_windows e bootstrap PowerShell - var PSRP nel vault.yml.example, pacchetti python pypsrp/pyspnego WSL - collection ansible.windows/community.windows - riferimenti nella documentazione (README/AGENTS/CLAUDE) Workstation Linux nativa: resta solo deadalus-fedora. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
7.4 KiB
7.4 KiB
AGENTS.md
Ansible-driven personal infrastructure repo for Void desktops, Linux workstations, WSL, and an Ubuntu server.
Source Of Truth
- Main orchestration:
ansible/site.yml - Inventory and layering inputs:
ansible/inventory/hosts.yml,ansible/inventory/group_vars/*.yml,ansible/inventory/host_vars/*.yml - Dotfiles live under
dotfiles/ - AI agent instructions (bootstrap, rules, knowledge) are centralized in
dotfiles/common/.config/ai/and shared between OpenCode, Codex, and Gemini CLI. - OpenCode loads its entrypoint configuration from
dotfiles/common/.config/opencode/opencode.json. - Codex config is rendered from
dotfiles/common/.codex/config.toml.j2somodel_instructions_filepoints to the deployed~/.config/ai/bootstrap.md.
Topology
- Void desktops:
ikaros,nymph - Native Linux workstation:
deadalus-fedora - WSL dev:
deadalus-wsl - Ubuntu server:
prometheus - Hosts intentionally belong to multiple groups; trust
ansible/site.ymlover hostname assumptions.
Working Rules
- Preserve layering
all -> OS -> profile -> host. - Keep
ansible/site.ymlsmall; orchestration belongs there, implementation belongs in roles. - Prefer minimal, targeted edits. Preserve idempotency and existing ordering.
- All hosts use
ansible_connection: local. - Treat
secrets/as sensitive. Never print secret values. - Tmux plugins are bootstrapped by TPM on the host; the repo only keeps tmux config and custom helper scripts.
- Read the relevant role tasks, templates, vars, and deployed dotfiles before editing.
Validation
- Default minimum:
ansible-playbook ansible/site.yml --syntax-check
- Repo-wide checks:
ansible-lint ansible/site.ymlansible-lint ansible/rolesyamllint ansible/
- Host-focused dry runs:
- Void desktop work:
ansible-playbook ansible/site.yml --limit ikaros --check --diffor--limit nymph --check --diff - Fedora workstation:
ansible-playbook ansible/site.yml --limit deadalus-fedora --check --diff - WSL dev:
ansible-playbook ansible/site.yml --limit deadalus-wsl --check --diff - Server:
ansible-playbook ansible/site.yml --limit prometheus --check --diff
- Void desktop work:
- Focused checks:
- Emacs dotfiles only:
ansible-playbook ansible/site.yml --limit ikaros --tags emacs --check --diffor--limit nymph --tags emacs --check --diff - Mail bootstrap:
sh -n scripts/bootstrap_mail.shandshellcheck scripts/bootstrap_mail.sh - Server compose render:
docker compose -f /opt/docker/server/docker-compose.yml config
- Emacs dotfiles only:
Conventions
- Use FQCN Ansible modules.
- Prefer declarative modules over
command/shell; whenshellis required, make idempotency and failure behavior explicit. - Start YAML files with
---, use 2-space indentation, and keep file modes quoted like"0644". - Keep booleans as booleans and structured vars as YAML lists/maps.
- Put host-specific overrides in
host_vars, not sharedgroup_vars. - Use
no_log: truefor secret-bearing task inputs or outputs.
Desktop Notes
profile_desktop_commonowns the shared desktop bootstrap;profile_desktop_i3(X11),profile_desktop_sway(Wayland/SwayFX), andprofile_desktop_hyprland(Wayland) install their respective sessions in parallel and are wired into thevoidplay inansible/site.yml.desktop_sessions_enabledanddesktop_default_sessionin host vars decide which sessions are exposed inempttyand which is preselected..emacs.dis deployed by a dedicatedprofile_desktop_commontask taggedemacs.- NTFS filesystem support is provided by
ntfs-3ginansible/inventory/group_vars/void.yml. - Void user services are managed by
turnstileand live underdotfiles/desktop/.config/service/. ssh-agentkeeps the stable socket~/.local/state/ssh-agent/socket.- Critical session entrypoints:
dotfiles/desktop/.xinitrc(i3 / X11)dotfiles/desktop/.config/sway/configplushost.confandsession-envdeployed viahost_sway_dotfiles(sway / Wayland)dotfiles/desktop/.config/hypr/hyprland.confplushost.confandsession-envdeployed viahost_hyprland_dotfiles(Hyprland / Wayland)
- Do not auto-restart
empttyduring playbook runs on active Void desktop hosts; restart it manually from another TTY/SSH session if needed. nymphis a Void laptop with NVIDIA Optimus, running sway (Wayland) and Hyprland (Wayland); host-specific tasks inprofile_desktop_host/tasks/nymph.ymlhandle GRUB NVIDIA cmdline params,prime-runwrapper, and the WirePlumber camera priority config. Multi-monitor on X11 is driven byautorandr; on sway it is driven bykanshi(config deployed viahost_sway_dotfiles), and on Hyprland by host-specific Hyprland monitor/workspace rules.
Void Package And Dotfile Bucket Rules
The four Void desktop package lists in ansible/inventory/group_vars/void.yml are kept disjoint by role:
void_packages_base— system runtime only (init/services, kernel, audio core, networking, filesystem, firewall, hardware daemons, runit logging).desktop_common_packages— WM-agnostic GUI infra (GTK theme, polkit, keyring, NM-applet, blueman, audio GUI, file manager backend + GVFS, portal, flatpak, printing/scanning).desktop_i3_packages/desktop_sway_packages/desktop_hyprland_packages— binaries specific to each session. Cross-WM packages used by both (dunst,rofi,alacritty) are intentionally duplicated in the two lists.profile_packagesin the same file is cross-distro and is overridden bygroup_vars/server.ymland the workstation group vars; do not move desktop-specific Void entries through it. The dotfile vars follow the same split:desktop_common_dotfiles(ingroup_vars/desktop.yml) carries WM-agnostic GUI config and user scripts (Thunar, mimeapps, GTK theme setup, Udiskie, fontconfig, WirePlumber, mpv, …);desktop_void_dotfiles(ingroup_vars/void.yml) is reserved for files that need Void runtime (turnstile services, bash runit/dbus/ssh-agent fragments,update-turnstile-env).
Workstation Notes
- Native Linux workstation hosts can combine
workstation_host_linuxwith an OS-specific dev group. deadalus-fedorakeeps GNOME managed settings inansible/inventory/host_vars/deadalus-fedora.yml.
Coding Agent Notes
- Shared agent packages live in
ai_agents_npm_packagesinansible/inventory/group_vars/all.yml. - Shared agent dotfiles live in
ai_agents_dotfiles; rendered configs live inai_agents_templates. - Desktop, native workstation, and WSL profiles consume the shared agent package list; do not duplicate package entries in profile-specific vars.
dotfiles_commoncopies common dotfiles plusai_agents_dotfiles, then rendersai_agents_templates.- Keep
.config/ai/as the common instruction source; update agent-specific entrypoints to reference it rather than duplicating instruction text.
Tooling Notes
- Install local tooling with:
python3 -m pip install ansible ansible-lint yamllint shellcheck-pyansible-galaxy collection install -r ansible/collections/requirements.yml
- Required collections currently include
ansible.posixandcommunity.general. .yamllinttreatsline-lengthas a warning at 120 chars and disablesdocument-startandcomments-indentation.
When Updating Docs
- Keep
README.mdandAGENTS.mdaligned when workflows materially change. - If you add a new operational area, also add the narrowest validation command for it.
- Call out checks you could not run and any follow-up verification needed.