Chad 7519f23a81
Fixes and Enhancements (#48)
* Fix metasplot install if /usr/local/bin is not active in path yet. Also use variables.

* Use plocate on openSUSE. Supposed to be faster. Cannot have both m and p installed at the same time and p comes with the base system.

* Include wheel group for user as well.

* Finalize GNOME settings, go with RC commands instead of dconf module.

* Add hostname to report files.

* Add TBD for shared home situation.

* Fix cron service for Fedora.

* Disable the power button.

* Fix Fedora ffmpeg issues. Move package modules from flatpak playbook. Uninstall firefox from package manager.

* Enhance update function to handle shared home between multiple distributions.

* Allow keeping local backups of files.

* Replace flatpak repair check with accept flag instead of battery so that any automated update runs do the cleanup.

* Begin hoarding settings files.

* Start building out a FireFox profile.

* Fix extra comment command in comment.

* Add an All option to completely compress the entire directory.

* Codium is still broken on all tested systems, hide from Favorites.

* Add scipt to handle audio files. Also can convert to 432Hz.

* Use cut instead of awk to get rid of first parameter. Fixes bugs when spaces are allowed in the filenames.

* Enhancements and bugfix for "$freq".

* Add playbook for desktop VPN clients. Start with Mullvad.

* Add website to the seeded projects.

* Add firmware updates to the update function.

* Allow `fwupdmgr` to fail and have `update` still continue.

* Shorten lines.

* Uninstall DeltaChat.

* Separate the firmware update into its own function.

* Add alias for cloning one folder to another without using rm/cp.

* Fix typo in rsync.

* Go ahead and add extra options.

* Make the files human readable size descriptions.

* Remove unnecessary v, P does good enough.
2024-01-23 09:43:42 -07:00

271 lines
9.1 KiB
YAML

---
# Use flatpaks because they're consistent versions across different distros! :)
## To see how much space is taken up try the .rc function flatpak-usage ##
# If you'd like to remove flatpaks to save space:
## Note: This functionality now exists in .rc function flatpak-purge ##
# $ flatpak remove --all --delete-data
# $ flatpak repair
# Then remove, autoremove, and purge flatpak executable with package manager.
# Source: https://softhints.com/how-to-completely-remove-flatpak-linux-mint/
## Flatpak Pre-reqs ##
- name: Workstation | Linux | Flatpak Distro | Flatpak | Install
package:
name: flatpak
update_cache: yes
- name: Workstation | Linux | Flatpak Distro | Flatpak | Add Flathub for System
flatpak_remote:
name: flathub
state: present
method: system
flatpakrepo_url: https://flathub.org/repo/flathub.flatpakrepo
## Flatpak Installs ##
- name: Workstation | Linux | Flatpak Distro | Flatpak | Variables
set_fact:
flatpak_exec_dir: "{{ user_user.home }}/bin"
flatpak_exec: "flatpak run"
- name: Workstation | Linux | Flatpak Distro | Flatpak | Arrays
set_fact:
flatpaks_generic:
- { app: "org.libreoffice.LibreOffice", name: "office", extra: "" }
- { app: "io.gitlab.librewolf-community", name: "librewolf", extra: "" }
- { app: "org.signal.Signal", name: "signal", extra: "" }
- { app: "org.mozilla.firefox", name: "firefox-flatpak", extra: "" }
- { app: "com.transmissionbt.Transmission", name: "transmission", extra: "" }
- { app: "org.gnome.Geary", name: "geary", extra: "" }
flatpaks_coding:
- { app: "com.vscodium.codium", name: "codium", extra: "" }
- { app: "com.google.AndroidStudio", name: "android-studio", extra: "" }
- { app: "io.dbeaver.DBeaverCommunity", name: "dbeaver", extra: "" }
- { app: "org.godotengine.Godot", name: "godot", extra: "" }
- { app: "com.visualstudio.code-oss", name: "code", extra: "" }
flatpaks_editing:
- { app: "org.shotcut.Shotcut", name: "shotcut", extra: "" }
- { app: "com.obsproject.Studio", name: "obs", extra: "" }
- { app: "org.gimp.GIMP", name: "gimp", extra: "" }
- { app: "org.openshot.OpenShot", name: "openshot", extra: "" }
flatpaks_gaming:
- { app: "com.valvesoftware.Steam", name: "steam", extra: "" }
- { app: "com.play0ad.zeroad", name: "zeroad", extra: "" }
- { app: "net.supertuxkart.SuperTuxKart", name: "tuxkart", extra: "" }
flatpaks_remove:
- { app: "com.visualstudio.code", name: "vscode", extra: "" } # Why does this throw an error? It's the correct ID.
- { app: "org.midori_browser.Midori", name: "midori", extra: "" }
- { app: "com.github.Eloston.UngoogledChromium", name: "unchrome", extra: "" }
- { app: "org.gnome.Evolution", name: "evolution", extra: "" } # Doesn't pick up GNOME theme since contained.
- { app: "org.mozilla.Thunderbird", name: "thunderbird", extra: "" } # Doesn't integrate with Nextcloud as well as Evolution.
- { app: "org.audacityteam.Audacity", name: "audacity", extra: "" } # Say "no thanks" to spyware.
- { app: "com.discordapp.Discord", name: "discord", extra: "" } # Stopped working, just spins and says Starting.
# 2022-11-20 No longer using any of these and they're taking up a lot of space. #
- { app: "im.riot.Riot", name: "element", extra: "" }
- { app: "org.telegram.desktop", name: "telegram", extra: "" }
- { app: "com.jetbrains.PyCharm-Community", name: "pycharm", extra: "" }
# End 2022-11-20 #
- { app: "io.lbry.lbry-app", name: "lbry", extra: "dbus-launch" } # No longer supported, noticed 2023-09-01.
- { app: "chat.delta.desktop", name: "deltachat", extra: "" } # No longer used, removed 2023-12-18.
# Generic #
- name: Workstation | Linux | Flatpak Distro | Flatpak | Generic | Installs
flatpak:
name: "{{ item.app }}"
remote: flathub
state: present
loop: "{{ flatpaks_generic }}"
ignore_errors: yes
- name: Workstation | Linux | Flatpak Distro | Flatpak | Generic | Executables
blockinfile:
path: "{{ flatpak_exec_dir }}/{{ item.name }}"
block: |
{{ item.extra }} {{ flatpak_exec }} {{ item.app }}
marker: '{mark}'
marker_begin: "#!{{ bash_exec.stdout }}"
marker_end: "exit 0"
state: present
create: yes
loop: "{{ flatpaks_generic }}"
become_user: "{{ user }}"
- name: Workstation | Linux | Flatpak Distro | Flatpak | Generic | Executable Permissions
file:
path: "{{ flatpak_exec_dir }}/{{ item.name }}"
state: file
mode: '0755'
loop: "{{ flatpaks_generic }}"
# Coding #
- name: Workstation | Linux | Flatpak Distro | Flatpak | Coding | Installs
flatpak:
name: "{{ item.app }}"
remote: flathub
state: present
loop: "{{ flatpaks_coding }}"
ignore_errors: yes
when: coding == true
- name: Workstation | Linux | Flatpak Distro | Flatpak | Coding | Executables
blockinfile:
path: "{{ flatpak_exec_dir }}/{{ item.name }}"
block: |
{{ item.extra }} {{ flatpak_exec }} {{ item.app }}
marker: '{mark}'
marker_begin: "#!{{ bash_exec.stdout }}"
marker_end: "exit 0"
state: present
create: yes
loop: "{{ flatpaks_coding }}"
become_user: "{{ user }}"
when: coding == true
- name: Workstation | Linux | Flatpak Distro | Flatpak | Coding | Executable Permissions
file:
path: "{{ flatpak_exec_dir }}/{{ item.name }}"
state: file
mode: '0755'
loop: "{{ flatpaks_coding }}"
when: coding == true
- name: Workstation | Linux | Flatpak Distro | Flatpak | Coding | Uninstall
flatpak:
name: "{{ item.app }}"
remote: flathub
state: absent
loop: "{{ flatpaks_coding }}"
ignore_errors: yes
when: not coding == true
- name: Workstation | Linux | Flatpak Distro | Flatpak | Coding | Remove Executables
file:
path: "{{ flatpak_exec_dir }}/{{ item.name }}"
state: absent
loop: "{{ flatpaks_coding }}"
ignore_errors: yes
when: not coding == true
# Media Editors #
- name: Workstation | Linux | Flatpak Distro | Flatpak | Audio/Video Editors | Installs
flatpak:
name: "{{ item.app }}"
remote: flathub
state: present
loop: "{{ flatpaks_editing }}"
ignore_errors: yes
when: editing == true
- name: Workstation | Linux | Flatpak Distro | Flatpak | Audio/Video Editors | Executables
blockinfile:
path: "{{ flatpak_exec_dir }}/{{ item.name }}"
block: |
{{ item.extra }} {{ flatpak_exec }} {{ item.app }}
marker: '{mark}'
marker_begin: "#!{{ bash_exec.stdout }}"
marker_end: "exit 0"
state: present
create: yes
loop: "{{ flatpaks_editing }}"
become_user: "{{ user }}"
when: editing == true
- name: Workstation | Linux | Flatpak Distro | Flatpak | Audio/Video Editors | Executable Permissions
file:
path: "{{ flatpak_exec_dir }}/{{ item.name }}"
state: file
mode: '0755'
loop: "{{ flatpaks_editing }}"
when: editing == true
- name: Workstation | Linux | Flatpak Distro | Flatpak | Audio/Video Editor Uninstalls
flatpak:
name: "{{ item.app }}"
remote: flathub
state: absent
loop: "{{ flatpaks_editing }}"
ignore_errors: yes
when: not editing == true
- name: Workstation | Linux | Flatpak Distro | Flatpak | Audio/Video Editors | Remove Executables
file:
path: "{{ flatpak_exec_dir }}/{{ item.name }}"
state: absent
loop: "{{ flatpaks_editing }}"
ignore_errors: yes
when: not editing == true
# Gaming #
- name: Workstation | Linux | Flatpak Distro | Flatpak | Gaming | Installs
flatpak:
name: "{{ item.app }}"
remote: flathub
state: present
loop: "{{ flatpaks_gaming }}"
ignore_errors: yes
when: gaming == true
- name: Workstation | Linux | Flatpak Distro | Flatpak | Gaming | Executables
blockinfile:
path: "{{ flatpak_exec_dir }}/{{ item.name }}"
block: |
{{ item.extra }} {{ flatpak_exec }} {{ item.app }}
marker: '{mark}'
marker_begin: "#!{{ bash_exec.stdout }}"
marker_end: "exit 0"
state: present
create: yes
loop: "{{ flatpaks_gaming }}"
become_user: "{{ user }}"
when: gaming == true
- name: Workstation | Linux | Flatpak Distro | Flatpak | Gaming | Executable Permissions
file:
path: "{{ flatpak_exec_dir }}/{{ item.name }}"
state: file
mode: '0755'
loop: "{{ flatpaks_gaming }}"
when: gaming == true
- name: Workstation | Linux | Flatpak Distro | Flatpak | Gaming | Uninstalls
flatpak:
name: "{{ item.app }}"
remote: flathub
state: absent
loop: "{{ flatpaks_gaming }}"
ignore_errors: yes
when: not gaming == true
- name: Workstation | Linux | Flatpak Distro | Flatpak | Gaming | Remove Executables
file:
path: "{{ flatpak_exec_dir }}/{{ item.name }}"
state: absent
loop: "{{ flatpaks_gaming }}"
ignore_errors: yes
when: not gaming == true
# Removals #
- name: Workstation | Linux | Flatpak Distro | Flatpak | Uninstalls | Uninstall
flatpak:
name: "{{ item.app }}"
remote: flathub
state: absent
loop: "{{ flatpaks_remove }}"
ignore_errors: yes
- name: Workstation | Linux | Flatpak Distro | Flatpak | Uninstalls | Remove Executables
file:
path: "{{ flatpak_exec_dir }}/{{ item.name }}"
state: absent
loop: "{{ flatpaks_remove }}"
ignore_errors: yes