From d01b4c4c6a416844ede7731882a7f5b3acefef96 Mon Sep 17 00:00:00 2001 From: Fabio Scotto di Santolo Date: Tue, 21 Apr 2026 09:58:21 +0200 Subject: [PATCH] Split Emacs dotfiles deployment --- AGENTS.md | 2 ++ README.md | 10 +++++++++- ansible/inventory/group_vars/desktop.yml | 10 ++++++---- ansible/roles/profile_desktop_common/tasks/main.yml | 12 ++++++++++++ 4 files changed, 29 insertions(+), 5 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index e92b3e5..52525ae 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -38,6 +38,7 @@ Ansible-driven personal infrastructure repo for Void desktops, Linux workstation - WSL dev: `ansible-playbook ansible/site.yml --limit deadalus-wsl --check --diff` - Server: `ansible-playbook ansible/site.yml --limit prometheus --check --diff` - Focused checks: +- Emacs dotfiles only: `ansible-playbook ansible/site.yml --limit ikaros --tags emacs --check --diff` or `--limit nymph --tags emacs --check --diff` - Waybar JSON: `python3 -m json.tool dotfiles/desktop/.config/waybar/config-sway.jsonc >/dev/null` - Mail bootstrap: `sh -n scripts/bootstrap_mail.sh` and `shellcheck scripts/bootstrap_mail.sh` - Windows bootstrap parse: `pwsh -NoProfile -Command "[void][System.Management.Automation.Language.Parser]::ParseFile('scripts/bootstrap_windows_workstation.ps1', [ref]$null, [ref]$null)"` @@ -53,6 +54,7 @@ Ansible-driven personal infrastructure repo for Void desktops, Linux workstation ## Desktop Void Notes - `profile_desktop_common` owns the shared desktop bootstrap. +- `.emacs.d` is deployed by a dedicated `profile_desktop_common` task tagged `emacs`. - User services are managed by `turnstile` and live under `dotfiles/desktop/.config/service/`. - `ssh-agent` runs under `turnstile` with stable socket `~/.local/state/ssh-agent/socket`. - Critical session entrypoints: diff --git a/README.md b/README.md index 52ad8fa..28c4f87 100644 --- a/README.md +++ b/README.md @@ -87,6 +87,7 @@ Lo stato attuale del profilo desktop include, tra le altre cose: - pacchetti Void Linux e servizi runit - `turnstile` per i servizi utente, inclusi `emacs` e `ssh-agent` - `ssh-agent` con socket stabile condiviso tra shell, SSH ed Emacs in `~/.local/state/ssh-agent/socket` +- `.emacs.d` distribuito da un task dedicato Ansible con tag `emacs` - `ollama` eseguito via container Podman - `tmux` con plugin gestiti da TPM al bootstrap del profilo desktop - Flatpak con remoto Flathub @@ -216,7 +217,14 @@ ansible-playbook ansible/site.yml --limit prometheus -e server_username=myuser - --- -# Composizione della configurazione +# Composizione della configurazione + +Deploy mirato della configurazione Emacs sui desktop Void: + +```bash +ansible-playbook ansible/site.yml --limit ikaros --tags emacs +ansible-playbook ansible/site.yml --limit nymph --tags emacs +``` La configurazione finale di una macchina è ottenuta combinando più livelli. diff --git a/ansible/inventory/group_vars/desktop.yml b/ansible/inventory/group_vars/desktop.yml index 738968b..24a08b1 100644 --- a/ansible/inventory/group_vars/desktop.yml +++ b/ansible/inventory/group_vars/desktop.yml @@ -233,10 +233,6 @@ desktop_common_dotfiles: src: .tmux/bin/ dest: .tmux/bin/ mode: preserve - - name: Emacs config - src: .emacs.d/ - dest: .emacs.d/ - mode: preserve - name: GPG authinfo for LLM APIs src: .authinfo.gpg dest: .authinfo.gpg @@ -266,6 +262,12 @@ desktop_common_dotfiles: dest: .ssh/config mode: "0600" +desktop_emacs_dotfiles: + - name: Emacs config + src: .emacs.d/ + dest: .emacs.d/ + mode: preserve + desktop_i3_dotfiles: - name: i3 config src: .config/i3/ diff --git a/ansible/roles/profile_desktop_common/tasks/main.yml b/ansible/roles/profile_desktop_common/tasks/main.yml index d537380..9ad4e0b 100644 --- a/ansible/roles/profile_desktop_common/tasks/main.yml +++ b/ansible/roles/profile_desktop_common/tasks/main.yml @@ -264,6 +264,18 @@ loop_control: label: "{{ item.dest }}" +- name: Copy Emacs desktop dotfiles + tags: [dotfiles, dotfiles:desktop, emacs] + ansible.builtin.copy: + src: "{{ playbook_dir }}/../dotfiles/desktop/{{ item.src }}" + dest: "{{ user_home }}/{{ item.dest }}" + owner: "{{ username }}" + group: "{{ user_group }}" + mode: "{{ item.mode }}" + loop: "{{ desktop_emacs_dotfiles | default([]) }}" + loop_control: + label: "{{ item.dest }}" + - name: Render desktop templates with private values tags: [dotfiles, dotfiles:desktop] ansible.builtin.template: