mirror of
https://github.com/fscotto/infra.git
synced 2026-11-26 13:49:52 +00:00
Compare commits
6 Commits
5d5339637d
...
4e8665a7d4
| Author | SHA1 | Date | |
|---|---|---|---|
| 4e8665a7d4 | |||
| 146c93c6c6 | |||
| 57c34a6de0 | |||
| 7928ff3825 | |||
| 90fe7a1671 | |||
| f6ef70a43f |
29
README.md
29
README.md
@@ -610,6 +610,35 @@ only in the entry for the agent being removed, then run:
|
||||
ansible-playbook ansible/site.yml --limit deadalus --tags ai_agents --check --diff
|
||||
```
|
||||
|
||||
### OpenCode Desktop on Fedora
|
||||
|
||||
`packages_fedora` also installs the [official OpenCode Desktop RPM](https://opencode.ai/download)
|
||||
on the Fedora/GNOME workstations `ikaros` and `nymph`. WSL, Fedora IoT, Void,
|
||||
and servers are excluded. This is independent of the npm-managed OpenCode CLI;
|
||||
its configuration, credentials, and lifecycle flags remain unchanged.
|
||||
|
||||
The version and per-architecture SHA-256 digests are pinned in
|
||||
`ansible/inventory/group_vars/fedora.yml`; update both together from the official
|
||||
[GitHub release](https://github.com/anomalyco/opencode/releases).
|
||||
Confirm the current Desktop version through the official download page, not
|
||||
GitHub's `/releases/latest` endpoint alone: on 2026-11-01 the official RPM download
|
||||
resolved to 2.2.5 while GitHub's `latest` still selected 1.19.5. The 1.x Desktop
|
||||
can reject free models and require an upgrade. Desktop is pinned to 2.2.5;
|
||||
the separately managed CLI remains unchanged.
|
||||
Upstream RPMs are unsigned, so only this DNF task disables signature checking,
|
||||
after verifying the downloaded RPM against its pinned checksum. No repository
|
||||
signature policy is changed. Set `opencode_desktop_enabled: false` to stop managing
|
||||
installation without uninstalling the application.
|
||||
|
||||
```bash
|
||||
ansible-playbook ansible/site.yml --limit ikaros --tags opencode_desktop --check --diff
|
||||
ansible-playbook ansible/site.yml --limit ikaros --tags opencode_desktop -K
|
||||
```
|
||||
|
||||
Run locally on each workstation (`ansible_connection: local`); use `--limit nymph`
|
||||
on the laptop. With a cold RPM cache, check mode reports that dependency resolution
|
||||
is not validated; the real run downloads, verifies, and installs the package.
|
||||
|
||||
## Main roles
|
||||
|
||||
| Role | What it does |
|
||||
|
||||
@@ -42,10 +42,6 @@ desktop_uv_tools:
|
||||
- python-lsp-server
|
||||
|
||||
desktop_common_dotfiles:
|
||||
- name: XDG autostart entries
|
||||
src: .config/autostart/
|
||||
dest: .config/autostart/
|
||||
mode: preserve
|
||||
- name: fastfetch config
|
||||
src: .config/fastfetch/
|
||||
dest: .config/fastfetch/
|
||||
|
||||
@@ -4,6 +4,7 @@ desktop_environment: gnome
|
||||
desktop_sessions_enabled: []
|
||||
desktop_default_session: gnome
|
||||
emacs_enabled: true
|
||||
opencode_desktop_enabled: true
|
||||
|
||||
# Fedora Workstation/GNOME desktop applications. Keep this profile separate from
|
||||
# workstation_* so nymph can remain a desktop laptop rather than a dev workstation.
|
||||
@@ -90,3 +91,13 @@ fedora_flatpak_packages:
|
||||
- com.spotify.Client
|
||||
- org.onlyoffice.desktopeditors
|
||||
- org.telegram.desktop
|
||||
|
||||
# GNOME-only dotfiles. Kept out of desktop_common_dotfiles so the Void desktops
|
||||
# do not receive XDG autostart entries for applications they do not install.
|
||||
# Nextcloud desktop is the `nextcloud-client` package in fedora_desktop_packages;
|
||||
# this entry matches what the client itself writes when "Launch on startup" is on.
|
||||
desktop_gnome_dotfiles:
|
||||
- name: Nextcloud autostart entry
|
||||
src: .config/autostart/Nextcloud.desktop
|
||||
dest: .config/autostart/Nextcloud.desktop
|
||||
mode: "0644"
|
||||
|
||||
@@ -60,6 +60,15 @@ fedora_dev_packages:
|
||||
fedora_flatpak_remote_name: flathub
|
||||
fedora_flatpak_remote_url: https://dl.flathub.org/repo/flathub.flatpakrepo
|
||||
|
||||
opencode_desktop_version: "2.2.5"
|
||||
# Digests published with the official GitHub release; update with the version.
|
||||
opencode_desktop_rpm_checksums:
|
||||
x86_64: sha256:4feb27fe98df9b7579abd31a790d331e9aff87c95f67081beefa2aaaa76ebada
|
||||
aarch64: sha256:e84b1e03e2b4fb337ddfe015b6457a7aa0dfe171338be08e643ad66b1657033a
|
||||
opencode_desktop_rpm_url: >-
|
||||
https://github.com/anomalyco/opencode/releases/download/v{{ opencode_desktop_version }}/opencode-desktop-linux-{{ ansible_facts['architecture'] }}.rpm
|
||||
opencode_desktop_rpm_path: "/var/cache/opencode-desktop-{{ opencode_desktop_version }}-{{ ansible_facts['architecture'] }}.rpm"
|
||||
|
||||
chatgpt_desktop_enabled: false
|
||||
chatgpt_desktop_supported_fedora_versions:
|
||||
- "43"
|
||||
|
||||
@@ -206,7 +206,7 @@ gnome_gsettings_settings:
|
||||
value: "false"
|
||||
- schema: org.gnome.nautilus.preferences
|
||||
key: default-folder-viewer
|
||||
value: "'list-view'"
|
||||
value: "'icon-view'"
|
||||
- schema: org.gnome.nautilus.preferences
|
||||
key: show-create-link
|
||||
value: "true"
|
||||
@@ -234,7 +234,7 @@ gnome_gsettings_settings:
|
||||
- schema: org.gnome.shell
|
||||
key: app-picker-layout
|
||||
value: >-
|
||||
[{'System': <{'position': <0>}>, 'Utilities': <{'position': <1>}>, 'org.fedoraproject.MediaWriter.desktop': <{'position': <2>}>, 'org.gnome.Contacts.desktop': <{'position': <3>}>, 'org.gnome.Calendar.desktop': <{'position': <4>}>, 'org.gnome.Calculator.desktop': <{'position': <5>}>, 'org.gnome.Weather.desktop': <{'position': <6>}>, 'org.gnome.clocks.desktop': <{'position': <7>}>, 'org.gnome.Maps.desktop': <{'position': <8>}>, 'org.gnome.SimpleScan.desktop': <{'position': <9>}>, 'org.gnome.TextEditor.desktop': <{'position': <10>}>, 'org.gnome.Settings.desktop': <{'position': <11>}>, 'org.gnome.Boxes.desktop': <{'position': <12>}>, 'org.gnome.Showtime.desktop': <{'position': <13>}>, 'org.gnome.Snapshot.desktop': <{'position': <14>}>, 'org.gnome.Characters.desktop': <{'position': <15>}>, 'org.gnome.Tour.desktop': <{'position': <16>}>, 'org.gnome.Yelp.desktop': <{'position': <17>}>, 'org.gnome.Software.desktop': <{'position': <18>}>, 'be.alexandervanhee.gradia.desktop': <{'position': <19>}>, 'com.github.jeromerobert.pdfarranger.desktop': <{'position': <20>}>, 'org.onlyoffice.desktopeditors.desktop': <{'position': <21>}>, 'org.gnome.Meld.desktop': <{'position': <22>}>, 'com.mattjakeman.ExtensionManager.desktop': <{'position': <23>}>}, {'com.raspberrypi.rpi-imager.desktop': <{'position': <0>}>, 'org.remmina.Remmina.desktop': <{'position': <1>}>, 'com.nextcloud.desktopclient.nextcloud.desktop': <{'position': <2>}>, 'ch.protonmail.protonmail-bridge.desktop': <{'position': <3>}>, 'syncthing-start.desktop': <{'position': <4>}>, 'syncthing-ui.desktop': <{'position': <5>}>, 'emacs.desktop': <{'position': <6>}>, 'emacs-client.desktop': <{'position': <7>}>, 'org.gnome.gitlab.somas.Apostrophe.desktop': <{'position': <8>}>, 'mpv.desktop': <{'position': <9>}>, 'htop.desktop': <{'position': <10>}>, 'ai-media-facefusion.desktop': <{'position': <11>}>, 'ai-media-rvc.desktop': <{'position': <12>}>}]
|
||||
[{'System': <{'position': <0>}>, 'Utilities': <{'position': <1>}>, 'org.fedoraproject.MediaWriter.desktop': <{'position': <2>}>, 'org.gnome.Contacts.desktop': <{'position': <3>}>, 'org.gnome.Calendar.desktop': <{'position': <4>}>, 'org.gnome.Calculator.desktop': <{'position': <5>}>, 'org.gnome.Weather.desktop': <{'position': <6>}>, 'org.gnome.clocks.desktop': <{'position': <7>}>, 'org.gnome.Maps.desktop': <{'position': <8>}>, 'org.gnome.SimpleScan.desktop': <{'position': <9>}>, 'org.gnome.TextEditor.desktop': <{'position': <10>}>, 'org.gnome.Settings.desktop': <{'position': <11>}>, 'org.gnome.Boxes.desktop': <{'position': <12>}>, 'org.gnome.Showtime.desktop': <{'position': <13>}>, 'org.gnome.Snapshot.desktop': <{'position': <14>}>, 'org.gnome.Characters.desktop': <{'position': <15>}>, 'org.gnome.Tour.desktop': <{'position': <16>}>, 'org.gnome.Yelp.desktop': <{'position': <17>}>, 'org.gnome.Software.desktop': <{'position': <18>}>, 'be.alexandervanhee.gradia.desktop': <{'position': <19>}>, 'com.github.jeromerobert.pdfarranger.desktop': <{'position': <20>}>, 'org.onlyoffice.desktopeditors.desktop': <{'position': <21>}>, 'org.gnome.Meld.desktop': <{'position': <22>}>, 'com.mattjakeman.ExtensionManager.desktop': <{'position': <23>}>}, {'com.raspberrypi.rpi-imager.desktop': <{'position': <0>}>, 'org.remmina.Remmina.desktop': <{'position': <1>}>, 'com.nextcloud.desktopclient.nextcloud.desktop': <{'position': <2>}>, 'syncthing-start.desktop': <{'position': <3>}>, 'syncthing-ui.desktop': <{'position': <4>}>, 'emacs.desktop': <{'position': <5>}>, 'emacs-client.desktop': <{'position': <6>}>, 'org.gnome.gitlab.somas.Apostrophe.desktop': <{'position': <7>}>, 'mpv.desktop': <{'position': <8>}>, 'htop.desktop': <{'position': <9>}>, 'ai-media-facefusion.desktop': <{'position': <10>}>, 'ai-media-rvc.desktop': <{'position': <11>}>}]
|
||||
- schema: org.gnome.shell
|
||||
key: disabled-extensions
|
||||
value: >-
|
||||
@@ -246,7 +246,7 @@ gnome_gsettings_settings:
|
||||
- schema: org.gnome.shell
|
||||
key: favorite-apps
|
||||
value: >-
|
||||
['org.gnome.Nautilus.desktop', 'org.mozilla.firefox.desktop', 'com.spotify.Client.desktop', 'net.thunderbird.Thunderbird.desktop', 'org.telegram.desktop.desktop', 'chatgpt.desktop', 'org.gnome.Ptyxis.desktop', 'virt-manager.desktop']
|
||||
['org.gnome.Nautilus.desktop', 'org.mozilla.firefox.desktop', 'com.spotify.Client.desktop', 'net.thunderbird.Thunderbird.desktop', 'org.telegram.desktop.desktop', 'chatgpt.desktop', 'ai.opencode.desktop.desktop', 'org.gnome.Ptyxis.desktop', 'virt-manager.desktop']
|
||||
- schema: org.gnome.shell
|
||||
key: remember-mount-password
|
||||
value: "true"
|
||||
|
||||
@@ -164,6 +164,13 @@
|
||||
loop_control:
|
||||
label: "{{ item.key }}"
|
||||
|
||||
- name: Manage OpenCode Desktop on Fedora graphical workstations
|
||||
tags: [packages, opencode_desktop]
|
||||
ansible.builtin.import_tasks: opencode_desktop.yml
|
||||
when:
|
||||
- "'graphical_desktop' in group_names"
|
||||
- opencode_desktop_enabled | default(false) | bool
|
||||
|
||||
- name: Validate ChatGPT desktop architecture on Fedora
|
||||
tags: [packages, chatgpt]
|
||||
ansible.builtin.assert:
|
||||
|
||||
42
ansible/roles/packages_fedora/tasks/opencode_desktop.yml
Normal file
42
ansible/roles/packages_fedora/tasks/opencode_desktop.yml
Normal file
@@ -0,0 +1,42 @@
|
||||
---
|
||||
- name: Validate OpenCode Desktop architecture on Fedora
|
||||
ansible.builtin.assert:
|
||||
that:
|
||||
- ansible_facts['architecture'] in opencode_desktop_rpm_checksums
|
||||
fail_msg: "No verified OpenCode Desktop RPM for {{ ansible_facts['architecture'] }}."
|
||||
|
||||
- name: Check for cached OpenCode Desktop RPM
|
||||
ansible.builtin.stat:
|
||||
path: "{{ opencode_desktop_rpm_path }}"
|
||||
get_checksum: false
|
||||
register: opencode_desktop_rpm_cache
|
||||
|
||||
- name: Download verified OpenCode Desktop RPM
|
||||
ansible.builtin.get_url:
|
||||
url: "{{ opencode_desktop_rpm_url }}"
|
||||
dest: "{{ opencode_desktop_rpm_path }}"
|
||||
checksum: "{{ opencode_desktop_rpm_checksums[ansible_facts['architecture']] }}"
|
||||
owner: root
|
||||
group: root
|
||||
mode: "0644"
|
||||
# get_url only sends HEAD in check mode and cannot populate a cold cache.
|
||||
when: not ansible_check_mode
|
||||
|
||||
- name: Install OpenCode Desktop on Fedora
|
||||
ansible.builtin.dnf:
|
||||
name: "{{ opencode_desktop_rpm_path }}"
|
||||
state: present
|
||||
# Upstream ships an unsigned RPM. The download above verifies its pinned
|
||||
# SHA-256; do not disable signature checks in system repository settings.
|
||||
disable_gpg_check: true
|
||||
when: not ansible_check_mode or opencode_desktop_rpm_cache.stat.exists
|
||||
|
||||
- name: Explain OpenCode Desktop cold-cache check-mode limitation
|
||||
ansible.builtin.debug:
|
||||
msg: >-
|
||||
A real run will download and SHA-256 verify OpenCode Desktop
|
||||
{{ opencode_desktop_version }} before ensuring it is installed.
|
||||
The RPM is not cached, so this dry run cannot validate DNF dependencies.
|
||||
when:
|
||||
- ansible_check_mode
|
||||
- not opencode_desktop_rpm_cache.stat.exists
|
||||
@@ -41,7 +41,7 @@
|
||||
owner: "{{ username }}"
|
||||
group: "{{ user_group }}"
|
||||
mode: "{{ item.mode }}"
|
||||
loop: "{{ desktop_common_dotfiles | default([]) }}"
|
||||
loop: "{{ (desktop_common_dotfiles | default([])) + (desktop_gnome_dotfiles | default([])) }}"
|
||||
loop_control:
|
||||
label: "{{ item.dest }}"
|
||||
|
||||
|
||||
11
dotfiles/desktop/.config/autostart/Nextcloud.desktop
Normal file
11
dotfiles/desktop/.config/autostart/Nextcloud.desktop
Normal file
@@ -0,0 +1,11 @@
|
||||
[Desktop Entry]
|
||||
Name=Nextcloud
|
||||
GenericName=File Synchronizer
|
||||
Exec="/usr/bin/nextcloud" --background
|
||||
Terminal=false
|
||||
Icon=Nextcloud
|
||||
Categories=Network
|
||||
Type=Application
|
||||
StartupNotify=false
|
||||
X-GNOME-Autostart-enabled=true
|
||||
X-GNOME-Autostart-Delay=10
|
||||
@@ -1,12 +0,0 @@
|
||||
[Desktop Entry]
|
||||
Type=Application
|
||||
Version=1.1
|
||||
Name=Proton Mail Bridge
|
||||
GenericName=Proton Mail Bridge for Linux
|
||||
Comment=Run Proton Mail Bridge in the background.
|
||||
Icon=ch.protonmail.protonmail-bridge
|
||||
Exec=/usr/bin/flatpak run --branch=stable --arch=x86_64 --command=protonmail-bridge ch.protonmail.protonmail-bridge
|
||||
Terminal=false
|
||||
Categories=Office;Email
|
||||
StartupWMClass=Proton Mail Bridge
|
||||
X-Flatpak=ch.protonmail.protonmail-bridge
|
||||
Reference in New Issue
Block a user