-
Notifications
You must be signed in to change notification settings - Fork 1
/
packages
104 lines (96 loc) · 1.67 KB
/
packages
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
# Conditionally set array of packages to install
# vim: filetype=bash
packages=()
rmmvpkgs=()
eval "$(. /etc/os-release && typeset -p ID)"
# Always install
packages+=(
curl
expect
extundelete
gawk
git
htop
jq
make
ncdu
net-tools
nmap
shellcheck
stow
tree
w3m
xauth
zsh
)
# Debian-based only (apt)
[[ $ID =~ ^(debian|ubuntu|pop|raspbian)$ ]] && packages+=(
dnsutils
libxml2-utils
wbritish
wget2
xz-utils
)
# RHEL-related only (rpm)
[[ $ID =~ ^(rhel|fedora.*|amzn|ol|rocky)$ ]] && packages+=(
bind-utils
vim-X11
whois
words
xmlstarlet
xz
)
# Guardian-agent dependencies
# - bastion hosts and laptop/desktop clients (name starts with h)
if [[ $(hostname -s) =~ ^(bastet|h.+)$ ]]; then
# Debian-based
[[ $ID =~ ^(debian|ubuntu|pop|raspbian)$ ]] && packages+=(
autossh
openssh-client
ssh-askpass
)
# RHEL-related
[[ $ID =~ ^(rhel|fedora.*|amzn|ol|rocky)$ ]] && packages+=(
autossh
openssh-askpass
openssh-clients
)
fi
# Linux desktop/laptop clients (name starts with h) - not WSL
# (cant't test for existence of $DISPLAY as now using X-forwarding)
if [[ $(hostname -s) =~ ^(h.+)$ ]] && grep -vqi microsoft /proc/version; then
[[ $ID =~ ^(debian|ubuntu)$ ]] && packages+=(
alacritty
copyq
feh
nsxiv
qutebrowser
vim-gtk3
wmctrl
zathura
)
fi
# WSL clients
if grep -qi microsoft /proc/version; then
packages+=(
dnsmasq
dos2unix
socat
xdg-user-dirs
)
# Debian-based (ie. Pengwin)
[[ $ID =~ debian ]] && packages+=(
alacritty
nsxiv
qutebrowser
vim-gtk3
wmctrl
zathura
)
fi
# Always remove
rmmvpkgs+=(
nano
xfce4-terminal
xterm
)