Browse Source

Moved software list to automatrop

What an organization. Hoping to be flexible enough.
master
Geoffrey Frogeye 1 year ago
parent
commit
4919fbea0e
Signed by: geoffrey GPG Key ID: C72403E7F82E6AD8
  1. 1
      config/automatrop/roles/software/handlers/main.yml
  2. 37
      config/automatrop/roles/software/tasks/main.yml
  3. 64
      config/automatrop/roles/software/templates/package_manager.j2
  4. 11
      config/automatrop/roles/software/templates/snippets/pm_android_tools.j2
  5. 12
      config/automatrop/roles/software/templates/snippets/pm_data_management.j2
  6. 66
      config/automatrop/roles/software/templates/snippets/pm_desktop_environment.j2
  7. 3
      config/automatrop/roles/software/templates/snippets/pm_dev_ansible.j2
  8. 10
      config/automatrop/roles/software/templates/snippets/pm_dev_c.j2
  9. 11
      config/automatrop/roles/software/templates/snippets/pm_dev_common.j2
  10. 3
      config/automatrop/roles/software/templates/snippets/pm_dev_docker.j2
  11. 6
      config/automatrop/roles/software/templates/snippets/pm_dev_fpga.j2
  12. 14
      config/automatrop/roles/software/templates/snippets/pm_dev_network.j2
  13. 9
      config/automatrop/roles/software/templates/snippets/pm_dev_python.j2
  14. 2
      config/automatrop/roles/software/templates/snippets/pm_dev_shell.j2
  15. 13
      config/automatrop/roles/software/templates/snippets/pm_disk_cleanup.j2
  16. 27
      config/automatrop/roles/software/templates/snippets/pm_document.j2
  17. 22
      config/automatrop/roles/software/templates/snippets/pm_dotfiles_dependencies.j2
  18. 12
      config/automatrop/roles/software/templates/snippets/pm_download.j2
  19. 21
      config/automatrop/roles/software/templates/snippets/pm_local_monitoring.j2
  20. 9
      config/automatrop/roles/software/templates/snippets/pm_mpd.j2
  21. 13
      config/automatrop/roles/software/templates/snippets/pm_multimedia_common.j2
  22. 12
      config/automatrop/roles/software/templates/snippets/pm_multimedia_editors.j2
  23. 4
      config/automatrop/roles/software/templates/snippets/pm_multimedia_toolbox.j2
  24. 30
      config/automatrop/roles/software/templates/snippets/pm_noandroid.j2
  25. 6
      config/automatrop/roles/software/templates/snippets/pm_remote.j2
  26. 21
      config/automatrop/roles/software/templates/snippets/pm_shell.j2
  27. 21
      config/automatrop/roles/software/templates/snippets/pm_terminal_essentials.j2
  28. 9
      config/automatrop/roles/software/templates/snippets/pm_termux.j2
  29. 11
      config/automatrop/roles/software/templates/snippets/pm_wine.j2
  30. 2
      config/scripts/common/installSoftware
  31. 2
      config/scripts/softwareList

1
config/automatrop/roles/software/handlers/main.yml

@ -13,4 +13,5 @@
use: makepkg
state: latest
listen: "software changed"
when: root_access
when: arch_based

37
config/automatrop/roles/software/tasks/main.yml

@ -9,13 +9,6 @@
ubuntu: "{{ ansible_distribution == 'Ubuntu' }}"
tags: softwarelist
# TODO Is this used?
- name: Set secondary variables
set_fact:
pacman: "{{ arch_based }}"
apt: "{{ termux or debian }}"
sudo: "{{ not termux }}"
# TODO Install python if not done
# Or maybe not, it requires a lot of automation for something that can be done
# very quickly manually and is usually uneccessary
@ -80,18 +73,19 @@
name:
- fakeroot
- base-devel
when: arch_based
become: "{{ sudo }}"
become: yes
when: arch_based and root_access
- name: Install AUR package manager (Arch)
aur:
name: yay-bin
when: arch
when: arch and root_access
- name: Install AUR package manager (Manjaro)
pacman:
name: yay
when: manjaro
become: yes
when: manjaro and root_access
# Not sure if regular Manjaro has yay in its community packages,
# but Manjaro-ARM sure does
@ -103,24 +97,23 @@
- name: Generate list of packages for package manager
set_fact:
packages: "{{ query('template', 'package_manager.j2')[0].split('\n')[:-1]|sort }}"
packages: "{{ query('template', 'package_manager.j2')[0].split('\n')[:-1]|sort|unique }}"
tags: softwarelist
- name: Check if list of packages changed
copy:
content: "{% for package in packages %}{{ package }}\n{% endfor %}"
dest: "{{ ansible_user_dir }}/.cache/automatrop/package_manager"
notify: "software changed"
tags: softwarelist
- name: Install packages (Arch-based)
aur:
name: "{{ packages }}"
extra_args: "--asdeps"
extra_args: "--asdeps --needed"
# Nothing is set as installed manually so it can
# be removed by dependency check.
# Current packages will be kept by the meta package
use: yay
when: arch_based
tags: softwarelist
- name: Check if list of packages changed
copy:
content: "{% for package in packages %}{{ package }}\n{% endfor %}"
dest: "{{ ansible_user_dir }}/.cache/automatrop/package_manager"
notify: "software changed"
tags: softwarelist
when: arch_based and root_access

64
config/automatrop/roles/software/templates/package_manager.j2

@ -1,26 +1,48 @@
{# Base shell packages #}
coreutils
bash
grep
sed
tar
openssl
{# Macros #}
{% if debian_based %}
python3-pip
{% elsif termux %}
python
{% set python_prefix = 'python3' %}
{% set lib_suffix = '-common' %}
{% else %}
python-pip
{% set python_prefix = 'python' %}
{% set lib_suffix = '' %}
{% endif %}
{# Extended shell packages #}
moreutils
tmux
bash-completion
fzf
highlight
{% if arch_based %}
powerline-go-bin
{# Include essential snippets #}
{% include 'snippets/pm_dotfiles_dependencies.j2' %}
{% include 'snippets/pm_shell.j2' %}
{% include 'snippets/pm_terminal_essentials.j2' %}
{% include 'snippets/pm_remote.j2' %}
{% include 'snippets/pm_disk_cleanup.j2' %}
{% include 'snippets/pm_local_monitoring.j2' %}
{% include 'snippets/pm_mpd.j2' %}
{% include 'snippets/pm_multimedia_toolbox.j2' %}
{% include 'snippets/pm_multimedia_common.j2' %}
{% include 'snippets/pm_data_management.j2' %}
{# Include rules-determined snippets #}
{% if display_manager %}
{% include 'snippets/pm_desktop_environment.j2' %}
{% endif %}
{% if termux %}
{% include 'snippets/pm_termux.j2' %}
{% else %}
powerline-go
{% include 'snippets/pm_noandroid.j2' %}
{% endif %}
{% if software_full %}
{% include 'snippets/pm_android_tools.j2' %}
{% include 'snippets/pm_multimedia_editors.j2' %}
{% include 'snippets/pm_download.j2' %}
{% include 'snippets/pm_wine.j2' %}
{% include 'snippets/pm_document.j2' %}
{% endif %}
{# Inclde dev snippets #}
{% if dev_stuffs %}
{% include 'snippets/pm_dev_common.j2' %}
{% for dev_stuff in dev_stuffs %}
{% include 'snippets/pm_dev_' + dev_stuff + '.j2' %}
{% endfor %}
{% endif %}
{# Include custom snippets #}
{% for software_snippet in software_snippets %}
{% if software_snippet.startswith('pm_') %}
{% include 'snippets/' + software_snippet + '.j2' %}
{% endif %}
zsh
{% endfor %}

11
config/automatrop/roles/software/templates/snippets/pm_android_tools.j2

@ -0,0 +1,11 @@
{#
Stuff for accessing Android phones
#}
{% if not termux %}
{% if arch_based %}
android-tools
android-udev
{% elif debian_based %}
adb
{% endif %}
{% endif %}

12
config/automatrop/roles/software/templates/snippets/pm_data_management.j2

@ -0,0 +1,12 @@
{#
Stuff to synchronize/backup data
#}
rsync
borg
syncthing
{% if arch_based %}
{% if ansible_architecture == 'x86_64' %}
freefilesync-bin
{# Not worth the compilation if you can't have the binaries #}
{% endif %}
{% endif %}

66
config/automatrop/roles/software/templates/snippets/pm_desktop_environment.j2

@ -0,0 +1,66 @@
firefox
pulseaudio
pacmixer
zbar
{% if arch_based %}
ttf-dejavu
ttf-twemoji
{% endif %}
{% if arch_based %}
xkb-qwerty-fr
{% endif %}
thunar
gedit
feh
zathura
{% if arch_based %}
zathura-pdf-mupdf
{% elif debian_based %}
zathura-pdf-poppler
{% endif %}
meld
{{ python_prefix }}-magic
{% if arch_based %}
yubikey-touch-detector
{% endif %}
{% if display_manager == "x11" %}
i3-wm
libgnomekbd{{ lib_suffix }}
dunst
i3lock
numlockx
rofi
{% if arch_based %}
rofimoji
{% endif %}
rxvt-unicode
{% if arch_based %}
urxvt-resize-font-git
alacritty
{% endif %}
scrot
simplescreenrecorder
trayer
unclutter
{% if arch_based %}
xautolock
{% endif %}
xclip
{% if arch_based %}
lemonbar-xft-git
wireless_tools
{% else %}
lemonbar
{% endif %}
autorandr
keynav
sct
xorg-xinit
{% if arch_based %}
xorg-xbacklight
{% elif debian_based %}
xbacklight
{% endif %}
{% elif display_manager == "wayland" %}
sway
{% endif %}

3
config/automatrop/roles/software/templates/snippets/pm_dev_ansible.j2

@ -0,0 +1,3 @@
ansible
ansible-lint
{# EOF #}

10
config/automatrop/roles/software/templates/snippets/pm_dev_c.j2

@ -0,0 +1,10 @@
{% if termux %}
{# Otherwise installed by base-devel or equivalent #}
make
gcc
{% endif %}
cmake
clang
ccache
gdb
{# EOF #}

11
config/automatrop/roles/software/templates/snippets/pm_dev_common.j2

@ -0,0 +1,11 @@
perf
git
jq
{% if arch_based %}
ctags
{% elif debian_based %}
universal-ctags
{% endif %}
{% if not termux %}
highlight
{% endif %}

3
config/automatrop/roles/software/templates/snippets/pm_dev_docker.j2

@ -0,0 +1,3 @@
docker
docker-compose
{# EOF #}

6
config/automatrop/roles/software/templates/snippets/pm_dev_fpga.j2

@ -0,0 +1,6 @@
yosys
iverilog
ghdl
{% if display_manager %}
gtkwave
{% endif %}

14
config/automatrop/roles/software/templates/snippets/pm_dev_network.j2

@ -0,0 +1,14 @@
wget
curl
socat
{% if arch_based %}
bind
{% else %}
dnsutils
{% endif %}
whois
nmap
tcpdump
{% if display_manager %}
wireshark-qt
{% endif %}

9
config/automatrop/roles/software/templates/snippets/pm_dev_python.j2

@ -0,0 +1,9 @@
mypy
{% if not arch_based %}
black
{% endif %}
{% if arch_based %}
python-language-server
pyls-mypy
python-language-server-black
{% endif %}

2
config/automatrop/roles/software/templates/snippets/pm_dev_shell.j2

@ -0,0 +1,2 @@
bash-language-server
{# EOF #}

13
config/automatrop/roles/software/templates/snippets/pm_disk_cleanup.j2

@ -0,0 +1,13 @@
{#
Program that essentially help you reduce disk usage
#}
jdupes
duperemove
optipng
{% if debian_based %}
libjpeg-turbo-progs
{% else %}
libjpeg-turbo
{% endif %}
reflac
{# EOF #}

27
config/automatrop/roles/software/templates/snippets/pm_document.j2

@ -0,0 +1,27 @@
{# Document utilities #}
pandoc
{% if arch_based %}
texlive-bibtexextra
texlive-core
texlive-fontsextra
texlive-formatsextra
texlive-latexextra
texlive-pictures
texlive-pstricks
texlive-science
{% elif debian_based %}
texlive-base
texlive-lang-european
{% endif %}
pdftk
{% if display_manager %}
{# Spell checking #}
hunspell-en_gb
hunspell-en_us
hunspell-fr
hunspell-nl
{# libreoffice-extension-grammalecte-fr #}
{% if arch_based %}
libreoffice-extension-languagetool
{% endif %}
{% endif %}

22
config/automatrop/roles/software/templates/snippets/pm_dotfiles_dependencies.j2

@ -0,0 +1,22 @@
{#
Stuff that is required for scripts/programs of dotfiles to work properly
#}
coreutils
bash
grep
sed
tar
openssl
git
wget
curl
{% if not termux %}
{{ python_prefix }}-pip
{# Termux already has pip via Python #}
{% endif %}
ansible
{# Uncompressors #}
unzip
unrar
p7zip
{# EOF #}

12
config/automatrop/roles/software/templates/snippets/pm_download.j2

@ -0,0 +1,12 @@
{#
Programs used to download sutff off the internet
#}
wget
curl
rsync
youtube-dl
megatools
transmission-cli
{% if display_manager %}
transmission-qt
{% endif %}

21
config/automatrop/roles/software/templates/snippets/pm_local_monitoring.j2

@ -0,0 +1,21 @@
{#
Shell utilities to see what's going on on the system
#}
htop
{% if root_access %}
iotop
iftop
{% endif %}
ncdu
{% if not termux %}
lsof
{% endif %}
strace
pv
progress
{% if not termux %}
speedtest-cli
{% endif %}
{% if arch_based %}
pacman-contrib
{% endif %}

9
config/automatrop/roles/software/templates/snippets/pm_mpd.j2

@ -0,0 +1,9 @@
{#
To play music with Music Player Daemon
#}
mpd
mpc
{% if arch_based %}
ashuffle-git
vimpc-git
{% endif %}

13
config/automatrop/roles/software/templates/snippets/pm_multimedia_common.j2

@ -0,0 +1,13 @@
{% if display_manager %}
gimp
inkscape
mpv
{% if arch_based %}
mpv-thumbnail-script
{% endif %}
{% if arch_based %}
libreoffice-fresh
{% elif debian_based %}
libreoffice
{% endif %}
{% endif %}

12
config/automatrop/roles/software/templates/snippets/pm_multimedia_editors.j2

@ -0,0 +1,12 @@
{#
Big behemoth applications
#}
{% if display_manager %}
gimp
inkscape
darktable
blender
puddletag
musescore
audacity
{% endif %}

4
config/automatrop/roles/software/templates/snippets/pm_multimedia_toolbox.j2

@ -0,0 +1,4 @@
ffmpeg
sox
imagemagick
{# EOF #}

30
config/automatrop/roles/software/templates/snippets/pm_noandroid.j2

@ -0,0 +1,30 @@
{#
Stuff that isn't required on Android because there are apps for that
#}
{# Password handling #}
pass
pwgen
{% if display_manager %}
rofi-pass
{# TODO Try autopass.cr #}
{% endif %}
{# Mail #}
isync
msmtp
notmuch
neomutt
lynx
{% if not arch_based %}
{# https://aur.archlinux.org/packages/tiv/#comment-812593 #}
tiv
{% endif %}
{% if display_manager %}
thunderbird
{% endif %}
{# Organisation #}
vdirsyncer
khard
khal
todoman
syncthing
{# EOF #}

6
config/automatrop/roles/software/templates/snippets/pm_remote.j2

@ -0,0 +1,6 @@
openssh
wget
rsync
{% if display_manager %}
tigervnc
{% endif %}

21
config/automatrop/roles/software/templates/snippets/pm_shell.j2

@ -0,0 +1,21 @@
{#
Shell related stuff
#}
{# ZSH #}
zsh
antigen
{% if arch_based %}
{# Antigen takex care of the above for others platforms #}
zsh-autosuggestions
zsh-completions
zsh-history-substring-search
zsh-syntax-highlighting
{% endif %}
tmux
bash-completion
fzf
{% if arch_based and ansible_architecture == 'x86_64' %}
powerline-go-bin
{% else %}
powerline-go
{% endif %}

21
config/automatrop/roles/software/templates/snippets/pm_terminal_essentials.j2

@ -0,0 +1,21 @@
moreutils
man
visidata
insect
translate-shell
{# Editor #}
{% if termux %}
nvim
{% else %}
neovim
{% endif %}
{% if not termux %}
{{ python_prefix }}-neovim
{% endif %}
{# Downloaders #}
wget
{# Uncompressors #}
unzip
unrar
p7zip
{# EOF #}

9
config/automatrop/roles/software/templates/snippets/pm_termux.j2

@ -0,0 +1,9 @@
{#
Stuff that only makes sense on Termux
#}
{% if termux %}
{% if root_access %}
tsu
{% endif %}
termux-api
{% endif %}

11
config/automatrop/roles/software/templates/snippets/pm_wine.j2

@ -0,0 +1,11 @@
{% if ansible_architecture == 'x86_64' %}
wine
{% if arch_based %}
wine-gecko
wine-mono
mono
lib32-libpulse
{% elif debian_based %}
mono-runtime
{% endif %}
{% endif %}

2
config/scripts/common/installSoftware

@ -1,5 +1,7 @@
#!/usr/bin/env sh
# DEPRECATED
# set -x
# Allows to install software

2
config/scripts/softwareList

@ -1,5 +1,7 @@
#!/usr/bin/env sh
# DEPRECATED
# List of the software I use divided by categories.
# Oh and it asks the category you want to install on
# the running machine too.

Loading…
Cancel
Save