diff --git a/AGENTS.md b/AGENTS.md index 52525ae..4b65049 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -56,6 +56,7 @@ Ansible-driven personal infrastructure repo for Void desktops, Linux workstation - `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/`. +- `desktop_ollama_enabled` controls whether the user `ollama` service is present; default is `false` and hosts can override it in `host_vars`. - `ssh-agent` runs under `turnstile` with stable socket `~/.local/state/ssh-agent/socket`. - Critical session entrypoints: - `dotfiles/desktop/.xinitrc` diff --git a/README.md b/README.md index 28c4f87..fae2f2f 100644 --- a/README.md +++ b/README.md @@ -88,7 +88,7 @@ Lo stato attuale del profilo desktop include, tra le altre cose: - `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 +- `ollama` eseguito via container Podman, con servizio utente controllato da `desktop_ollama_enabled` (default `false`) - `tmux` con plugin gestiti da TPM al bootstrap del profilo desktop - Flatpak con remoto Flathub - GNOME Keyring e bootstrap della posta via script dedicato diff --git a/ansible/inventory/group_vars/desktop.yml b/ansible/inventory/group_vars/desktop.yml index 4e51e0a..4544b61 100644 --- a/ansible/inventory/group_vars/desktop.yml +++ b/ansible/inventory/group_vars/desktop.yml @@ -8,6 +8,7 @@ desktop_default_session: i3 desktop_default_session_env: xorg desktop_restart_emptty_automatically: false desktop_emptty_session_error_logging: disabled +desktop_ollama_enabled: false desktop_common_packages: - brightnessctl diff --git a/ansible/roles/profile_desktop_common/tasks/main.yml b/ansible/roles/profile_desktop_common/tasks/main.yml index 9ad4e0b..34a8a79 100644 --- a/ansible/roles/profile_desktop_common/tasks/main.yml +++ b/ansible/roles/profile_desktop_common/tasks/main.yml @@ -264,6 +264,13 @@ loop_control: label: "{{ item.dest }}" +- name: Remove disabled ollama user service + tags: [dotfiles, dotfiles:desktop, services] + ansible.builtin.file: + path: "{{ user_home }}/.config/service/ollama" + state: absent + when: not (desktop_ollama_enabled | default(false) | bool) + - name: Copy Emacs desktop dotfiles tags: [dotfiles, dotfiles:desktop, emacs] ansible.builtin.copy: