---
- name: Install keyd
  community.general.xbps:
    name:
      - keyd
    state: "{{ desired_package_state | default('present') }}"
  tags:
    - packages

- name: Set up keyd umlaut configuration
  ansible.builtin.copy:
    src: default.conf
    dest: "/etc/keyd/default.conf"
    force: yes

- name: Activate keyd service
  ansible.builtin.file:
    src: "/etc/sv/keyd"
    dest: "/etc/runit/runsvdir/default/keyd"
    state: link
    force: true