---
- name: Install packages
  hosts: localhost
  connection: local
  become: false
  tasks:
    - name: Install apt packages
      become: true
      ansible.builtin.apt:
        autoclean: true
        autoremove: true
        install_recommends: true
        pkg:
          - ansible
          - curl
          - fcitx5
          - firefox-esr
          - foot
          - git
          - grimshot
          - lxpolkit
          - network-manager-gnome
          - nextcloud-desktop
          - npm
          - pass
          - pipx
          - plocate
          - python3-yamlfix
          - sway
          - sway-backgrounds
          - sway-notification-center
          - swayidle
          - swaylock
          - unzip
          - waybar
          - wget
          - wl-clipboard
          - wofi
          - yq
          - zsh
        state: latest
        update_cache: true
    - name: Remove apt packages
      become: true
      ansible.builtin.apt:
        autoclean: true
        autoremove: true
        install_recommends: true
        pkg: [nano]
        state: absent
        update_cache: true
