feat: add the gnome role #48

Merged
aleksei merged 3 commits from feat/gnome-role into main 2026-11-21 02:46:59 +00:00
Owner

What changes

  • roles/gnome checks that GNOME Shell is installed and fails otherwise; it
    never installs GNOME.
  • It clones https://git.kosyrev.name/zoo/gnome-icon-sepia.git at the pinned
    commit b604f50abc9426f4c1d6bfec1fb63a562796e4a4 directly into the
    desktop user's
    ~/.local/share/gnome-shell/extensions/gnome-icon-sepia. The extension
    directory is therefore the git checkout itself; there is no separate cache.
    If the directory exists but is not a git checkout, the role replaces it with
    a fresh clone. Later runs fetch/checkout the pinned commit in place.
  • It enables the extension through org.gnome.shell enabled-extensions. GNOME
    50 reads that list at session start, so a newly installed extension takes
    effect after a re-login.
  • It applies:
    • gsettings set org.gnome.shell.extensions.dash-to-dock hotkeys-overlay false
    • gsettings set org.gnome.desktop.wm.keybindings switch-input-source "['<Alt>Shift_L', '<Shift>Alt_L']"

The role resolves gnome_user through getent, runs the git clone and session
commands as that user, and fails with a clear message if the user has no session
bus. It requires gnome_user to be set.

desktop_aleksei gets gnome_user: aleksei. The existing git role is added
to its playbook before gnome.

Rollout

The git role was applied to desktop_aleksei (ok=3 changed=1); git ls-remote from the host returns the pinned commit. The gnome role was then
applied (ok=17 changed=2): it replaced the old non-git extension directory
with a clone at
/home/aleksei/.local/share/gnome-shell/extensions/gnome-icon-sepia. The
directory is now a git repository owned by aleksei:aleksei at the pinned
commit; the old /var/cache/gnome-icon-sepia was removed. A second run reports
ok=16 changed=0 failed=0 skipped=4.

gnome-extensions info reports Enabled: Yes, State: ACTIVE. Both requested
gsettings values are in place.

Verification

  • ansible-playbook --syntax-check playbooks/desktop_aleksei.yaml passes.
  • ansible-playbook --list-tasks playbooks/desktop_aleksei.yaml resolves every
    role and task.
  • dprint check passes.
  • The extension directory is a clean git checkout at the pinned commit.
  • A repeated --tags gnome run is idempotent (changed=0).
  • The extension metadata supports GNOME Shell 50.1, the host's version.
## What changes - `roles/gnome` checks that GNOME Shell is installed and fails otherwise; it never installs GNOME. - It clones `https://git.kosyrev.name/zoo/gnome-icon-sepia.git` at the pinned commit `b604f50abc9426f4c1d6bfec1fb63a562796e4a4` **directly into** the desktop user's `~/.local/share/gnome-shell/extensions/gnome-icon-sepia`. The extension directory is therefore the git checkout itself; there is no separate cache. If the directory exists but is not a git checkout, the role replaces it with a fresh clone. Later runs fetch/checkout the pinned commit in place. - It enables the extension through `org.gnome.shell enabled-extensions`. GNOME 50 reads that list at session start, so a newly installed extension takes effect after a re-login. - It applies: - `gsettings set org.gnome.shell.extensions.dash-to-dock hotkeys-overlay false` - `gsettings set org.gnome.desktop.wm.keybindings switch-input-source "['<Alt>Shift_L', '<Shift>Alt_L']"` The role resolves `gnome_user` through `getent`, runs the git clone and session commands as that user, and fails with a clear message if the user has no session bus. It requires `gnome_user` to be set. `desktop_aleksei` gets `gnome_user: aleksei`. The existing `git` role is added to its playbook before `gnome`. ## Rollout The `git` role was applied to `desktop_aleksei` (`ok=3 changed=1`); `git ls-remote` from the host returns the pinned commit. The `gnome` role was then applied (`ok=17 changed=2`): it replaced the old non-git extension directory with a clone at `/home/aleksei/.local/share/gnome-shell/extensions/gnome-icon-sepia`. The directory is now a git repository owned by `aleksei:aleksei` at the pinned commit; the old `/var/cache/gnome-icon-sepia` was removed. A second run reports `ok=16 changed=0 failed=0 skipped=4`. `gnome-extensions info` reports `Enabled: Yes`, `State: ACTIVE`. Both requested gsettings values are in place. ## Verification - `ansible-playbook --syntax-check playbooks/desktop_aleksei.yaml` passes. - `ansible-playbook --list-tasks playbooks/desktop_aleksei.yaml` resolves every role and task. - `dprint check` passes. - The extension directory is a clean git checkout at the pinned commit. - A repeated `--tags gnome` run is idempotent (`changed=0`). - The extension metadata supports GNOME Shell 50.1, the host's version.
aleksei deleted branch feat/gnome-role 2026-11-21 02:46:59 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
zoo/infra!48
No description provided.