---
# Define program names per OS for package builtin.
# This is only for Workstation devices with UIs.

- name: Workstation | Facts | Packages | Parrot OS Fixes
  set_fact:
    ansible_pkg_mgr: "apt"
    ansible_python_interpreter: "/usr/bin/python3"
  when: ansible_distribution == "Parrot OS"


- name: Workstation | Facts | Package | Consistent
  set_fact:
    firefox: firefox
    firefox_esr: firefox-esr
    thunderbird: thunderbird
    evolution: evolution
    psutil: python3-psutil
    gnome_tweaks: gnome-tweaks
    dconf_editor: dconf-editor
    appimagelauncher: htop #placeholder
    nfs: nfs-common
    msgfmt: gettext
    make: make
    font_awesome: fonts-font-awesome
    dmenu: dmenu
    sassc: sassc
    ffmpeg: ffmpeg


- name: Workstation | Facts | Package | Pop_OS!
  set_fact:
    flatpak_distro: true
    firefox_esr: firefox
  when: ansible_distribution == "Pop!_OS"


- name: Workstation | Facts | Package | Ubuntu
  set_fact:
    flatpak_distro: true
    firefox_esr: firefox
    dmenu: suckless-tools
  when: ansible_distribution == "Ubuntu"


- name: Workstation | Facts | Package | Debian
  set_fact:
    flatpak_distro: true
    dmenu: suckless-tools
  when: ansible_distribution == "Debian"


- name: Workstation | Facts | Package | Mint
  set_fact:
    flatpak_distro: true
    firefox_esr: firefox
  when: ansible_distribution == "Linux Mint"


- name: Workstation | Facts | Package | Parrot OS
  set_fact:
    flatpak_distro: true
    firefox_esr: firefox-esr
  when: ansible_distribution == "Parrot OS"


- name: Workstation | Facts | Package | Arch + Manjaro
  set_fact:
    flatpak_distro: true
    firefox_esr: firefox
    psutil: python-psutil
    appimagelauncher: appimagelauncher
  when: ansible_distribution == "Archlinux"


- name: Workstation | Facts | Package | FreeBSD
  set_fact:
    flatpak_distro: false
    psutil: py38-psutil
    ansible_python_interpreter: "/usr/local/bin/python3.8"
    make: gmake # make comes with OS and cannot be installed with pkg. Try using gmake for better luck.
    font_awesome: font-awesome
  when: ansible_system == "FreeBSD"


- name: Workstation | Facts | Package | Fedora
  set_fact:
    flatpak_distro: true
    firefox_esr: firefox
    font_awesome: python3-XStatic-Font-Awesome
    nfs: nfs-utils
    ffmpeg: ffmpeg-free
  when: ansible_distribution == "Fedora"


- name: Workstation | Facts | Package | openSUSE
  set_fact:
    flatpak_distro: true
    firefox_esr: firefox-esr-branding-openSUSE
    font_awesome: fontawesome-fonts
    nfs: utils-libnfs
  when: ansible_os_family == "Suse"


- name: Workstation | Facts | Package | NixOS
  set_fact:
    flatpak_distro: false
  when: ansible_distribution == "NixOS"