mirror of
https://github.com/fscotto/infra.git
synced 2026-05-30 15:39:58 +00:00
- Add canonical usb-drive-manager plugin to Noctalia (symlink from official) - Remove nm-applet and blueman packages from nymph Sway session - Run udiskie without tray (backend for automount/LUKS, UI via usb-drive-manager) - Add screenOverrides support to Noctalia bar via inventory variables - Add host_packages_absent task to packages_void role - Update desktop docs with full plugin list and config layering - Add focused validation check for Sway/Noctalia bootstrap
143 lines
4.9 KiB
YAML
143 lines
4.9 KiB
YAML
---
|
|
- name: Check whether official Clipper plugin directory exists
|
|
ansible.builtin.stat:
|
|
path: "{{ user_home }}/.local/share/noctalia-plugins/official/clipper"
|
|
follow: false
|
|
register: official_clipper_path_state
|
|
|
|
- name: Repair official Clipper plugin permissions before git update
|
|
ansible.builtin.file:
|
|
path: "{{ user_home }}/.local/share/noctalia-plugins/official/clipper"
|
|
state: directory
|
|
recurse: true
|
|
owner: "{{ username }}"
|
|
group: "{{ user_group }}"
|
|
mode: "u=rwX,go=rX"
|
|
when:
|
|
- official_clipper_path_state.stat.exists
|
|
- official_clipper_path_state.stat.isdir
|
|
|
|
- name: Remove untracked files from official Clipper subtree before git update
|
|
ansible.builtin.command:
|
|
cmd: git clean -fd -- clipper
|
|
chdir: "{{ user_home }}/.local/share/noctalia-plugins/official"
|
|
become_user: "{{ username }}"
|
|
environment:
|
|
HOME: "{{ user_home }}"
|
|
register: official_clipper_clean
|
|
changed_when: >-
|
|
(official_clipper_clean.stdout | default('') | trim) != '' or
|
|
(official_clipper_clean.stderr | default('') | trim) != ''
|
|
when:
|
|
- official_clipper_path_state.stat.exists
|
|
- official_clipper_path_state.stat.isdir
|
|
|
|
- name: Bootstrap official Noctalia plugins checkout
|
|
ansible.builtin.git:
|
|
repo: https://github.com/noctalia-dev/noctalia-plugins.git
|
|
dest: "{{ user_home }}/.local/share/noctalia-plugins/official"
|
|
version: main
|
|
update: true
|
|
force: true
|
|
become_user: "{{ username }}"
|
|
environment:
|
|
HOME: "{{ user_home }}"
|
|
|
|
- name: Check if Clipper is a real directory (needs migration to symlink)
|
|
ansible.builtin.stat:
|
|
path: "{{ user_home }}/.config/noctalia/plugins/clipper"
|
|
follow: false
|
|
register: clipper_path_state
|
|
|
|
- name: Check whether Clipper pinned data exists
|
|
ansible.builtin.stat:
|
|
path: "{{ user_home }}/.config/noctalia/plugins/clipper/pinned.json"
|
|
register: clipper_pinned_state
|
|
when:
|
|
- clipper_path_state.stat.exists
|
|
- clipper_path_state.stat.isdir
|
|
- not (clipper_path_state.stat.islnk | default(false))
|
|
|
|
- name: Preserve Clipper pinned data before migration
|
|
ansible.builtin.copy:
|
|
src: "{{ user_home }}/.config/noctalia/plugins/clipper/pinned.json"
|
|
dest: "{{ user_home }}/.local/share/noctalia-plugins/official/clipper/pinned.json"
|
|
remote_src: true
|
|
owner: "{{ username }}"
|
|
group: "{{ user_group }}"
|
|
mode: "0644"
|
|
become_user: "{{ username }}"
|
|
environment:
|
|
HOME: "{{ user_home }}"
|
|
when:
|
|
- clipper_pinned_state is defined and clipper_pinned_state.stat is defined and clipper_pinned_state.stat.exists
|
|
|
|
- name: Check whether Clipper notecards directory exists
|
|
ansible.builtin.stat:
|
|
path: "{{ user_home }}/.config/noctalia/plugins/clipper/notecards"
|
|
register: clipper_notecards_state
|
|
when:
|
|
- clipper_path_state.stat.exists
|
|
- clipper_path_state.stat.isdir
|
|
- not (clipper_path_state.stat.islnk | default(false))
|
|
|
|
- name: Preserve Clipper notecards before migration
|
|
ansible.builtin.copy:
|
|
src: "{{ user_home }}/.config/noctalia/plugins/clipper/notecards/"
|
|
dest: "{{ user_home }}/.local/share/noctalia-plugins/official/clipper/notecards/"
|
|
remote_src: true
|
|
owner: "{{ username }}"
|
|
group: "{{ user_group }}"
|
|
mode: preserve
|
|
become_user: "{{ username }}"
|
|
environment:
|
|
HOME: "{{ user_home }}"
|
|
when:
|
|
- clipper_notecards_state is defined and clipper_notecards_state.stat is defined and clipper_notecards_state.stat.exists and clipper_notecards_state.stat.isdir
|
|
|
|
- name: Remove old Clipper directory (migration to symlink)
|
|
ansible.builtin.file:
|
|
path: "{{ user_home }}/.config/noctalia/plugins/clipper"
|
|
state: absent
|
|
when:
|
|
- clipper_path_state.stat.exists
|
|
- clipper_path_state.stat.isdir
|
|
- not (clipper_path_state.stat.islnk | default(false))
|
|
|
|
- name: Create Clipper symlink to official plugin
|
|
ansible.builtin.file:
|
|
src: "{{ user_home }}/.local/share/noctalia-plugins/official/clipper"
|
|
dest: "{{ user_home }}/.config/noctalia/plugins/clipper"
|
|
state: link
|
|
force: true
|
|
owner: "{{ username }}"
|
|
group: "{{ user_group }}"
|
|
|
|
- name: Check if usb-drive-manager is a real directory (needs migration to symlink)
|
|
ansible.builtin.stat:
|
|
path: "{{ user_home }}/.config/noctalia/plugins/usb-drive-manager"
|
|
follow: false
|
|
register: usb_drive_manager_path_state
|
|
|
|
- name: Remove old usb-drive-manager directory (migration to symlink)
|
|
ansible.builtin.file:
|
|
path: "{{ user_home }}/.config/noctalia/plugins/usb-drive-manager"
|
|
state: absent
|
|
when:
|
|
- usb_drive_manager_path_state.stat.exists
|
|
- usb_drive_manager_path_state.stat.isdir
|
|
- not (usb_drive_manager_path_state.stat.islnk | default(false))
|
|
|
|
- name: Link official Noctalia plugins
|
|
ansible.builtin.file:
|
|
src: "{{ user_home }}/.local/share/noctalia-plugins/official/{{ item }}"
|
|
dest: "{{ user_home }}/.config/noctalia/plugins/{{ item }}"
|
|
state: link
|
|
force: true
|
|
owner: "{{ username }}"
|
|
group: "{{ user_group }}"
|
|
loop:
|
|
- polkit-agent
|
|
- screenshot
|
|
- usb-drive-manager
|