---
- name: enable bluetooth
  systemd:
    name: bluetooth.service
    enabled: yes
    state: started

- name: restart pulseaudio as user
  systemd:
    name: pulseaudio.service
    scope: user
    state: restarted
  become: yes
  become_user: "{{ user.name }}"
  environment:
    XDG_RUNTIME_DIR: "/run/user/{{ user.uid }}"

- name: enable cron
  systemd:
    name: cronie.service
    enabled: yes
    state: started

- name: enable sshd
  systemd:
    name: sshd.service
    enabled: yes
    state: started

- name: enable cups
  systemd:
    name: org.cups.cupsd.service
    enabled: yes
    state: started

- name: enable gdm
  systemd:
    name: gdm
    enabled: yes

- name: enable waybar
  systemd:
    name: waybar
    scope: user
    enabled: yes
  become: yes
  become_user: "{{ user.name }}"

- name: enable swayidle
  systemd:
    name: swayidle
    scope: user
    enabled: yes
  become: yes
  become_user: "{{ user.name }}"

- name: enable ssh-agent
  systemd:
    name: ssh-agent
    scope: user
    enabled: yes
    state: started
  become: yes
  become_user: "{{ user.name }}"

- name: enable pcscd
  systemd:
    name: pcscd.service
    enabled: yes
    state: started

---
- name: enable bluetooth
  systemd:
    name: bluetooth.service
    enabled: yes
    state: started

- name: restart pulseaudio as user
  systemd:
    name: pulseaudio.service
    scope: user
    state: restarted
  become: yes
  become_user: "{{ user.name }}"
  environment:
    XDG_RUNTIME_DIR: "/run/user/{{ user.uid }}"

- name: enable cron
  systemd:
    name: cronie.service
    enabled: yes
    state: started

- name: enable sshd
  systemd:
    name: sshd.service
    enabled: yes
    state: started

- name: enable cups
  systemd:
    name: org.cups.cupsd.service
    enabled: yes
    state: started

- name: enable gdm
  systemd:
    name: gdm
    enabled: yes

- name: enable waybar
  systemd:
    name: waybar
    scope: user
    enabled: yes
  become: yes
  become_user: "{{ user.name }}"
  environment:
    XDG_RUNTIME_DIR: "/run/user/{{ user.uid }}"

- name: enable swayidle
  systemd:
    name: swayidle
    scope: user
    enabled: yes
  become: yes
  become_user: "{{ user.name }}"
  environment:
    XDG_RUNTIME_DIR: "/run/user/{{ user.uid }}"

- name: enable ssh-agent
  systemd:
    name: ssh-agent
    scope: user
    enabled: yes
    state: started
  become: yes
  become_user: "{{ user.name }}"
  environment:
    XDG_RUNTIME_DIR: "/run/user/{{ user.uid }}"

- name: enable pcscd
  systemd:
    name: pcscd.service
    enabled: yes
    state: started

Fix enabling user systemd unit files
Fix enabling user systemd unit files
