-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdefault-profile-install-arch.sh
More file actions
executable file
·201 lines (163 loc) · 7.4 KB
/
default-profile-install-arch.sh
File metadata and controls
executable file
·201 lines (163 loc) · 7.4 KB
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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
#!/bin/sh
scriptDir="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"
. ./functions/basicFunctions.sh
. ./functions/securityFunctions.sh
. ./functions/archPackagesFunctions.sh
. ./functions/systemDFunctions.sh
. ./functions/devEnvFunctions.sh
. ./functions/themingFunctions.sh
. ./functions/packageFunctions.sh
sudo pacman -Sy archlinux-keyring fakeroot --noconfirm --needed
isArm=false
echo "Configuring pacman ..."
architecture=$(uname -m | grep -E "arm|aarch")
if [[ $architecture == *"arm"* || $architecture == *"aarch"* ]]; then
echo -n "$RED"
echo "ARM system detected ..."
echo -n "$NC"
sudo cp ~/.files/makepkgARM.conf /etc/makepkg.conf
isArm=true
else
sudo cp defaults/pacman.conf /etc/pacman.conf
sudo cp ~/.files/makepkg.conf /etc/makepkg.conf
sudo chmod 744 /etc/pacman.conf
isArm=false
fi
InstallAurPackage "rate-mirrors-bin" "https://aur.archlinux.org/rate-mirrors-bin.git"
echo "Setting up pacman mirror list:"
if $isArm ; then
rate-mirrors archarm | sudo tee /etc/pacman.d/mirrorlist
else
rate-mirrors arch | sudo tee /etc/pacman.d/mirrorlist
fi
sudo pacman -Syu --noconfirm --needed
echo "Updating file permissions ..."
chmod +x ~/.profile
chmod +x ~/.zprofile
chmod -R +x ~/.config/waybar/scripts
chmod -R +x ~/.scripts
chmod -R +x ~/.config/neomutt/scripts
chmod 700 ~/.gnupg -R
echo "Copying default config files"
sudo mkdir /etc/sddm.conf.d
sudo cp ~/.files/sddm/* /etc/sddm.conf.d/
sudo cp -r ~/.files/sddm/themes/* /usr/share/sddm/themes/
sudo cp ~/.files/default-sudo-timeout /etc/sudoers.d/default-sudo-timeout
sudo cp ~/.files/modprobe.d/regdom.conf /etc/modprobe.d/regdom.conf
sudo cp ~/.files/zram-config /etc/systemd/zram-generator.conf
sudo cp ~/.files/vm-zram-settings.conf /etc/sysctl.d/99-vm-zram-parameters.conf
mkdir -p ~/.config/neomutt/mail/astrophotography-proton
mkdir -p ~/.config/neomutt/mail/tino-proton
sudo chmod -R 700 ~/.config/neomutt/mail
rm -rf ~/wallpapers
ln -sf ~/Nextcloud/Wallpapers ~/wallpapers
mkdir -p ~/.ssh
ln -sf ~/Nextcloud/Documents/ssh_config ~/.ssh/config
rm ~/pacman.conf
rm ~/pacman.arm.conf
source ~/.profile
echo "Installing stuff..."
sudo pacman -S pkgconfig bc powerline-fonts debugedit ttf-firacode-nerd ttf-arimo-nerd gcc boost ffmpeg make cmake otf-fira-mono otf-fira-sans ttf-fira-code ttf-fira-mono ttf-fira-sans zsh zsh-completions automake m4 autoconf --noconfirm --needed
sudo pacman -S bash-completion networkmanager network-manager-applet firefox fastfetch --noconfirm --needed
sudo pacman -S pipewire pipewire-pulse wireplumber pavucontrol nautilus zram-generator --noconfirm --needed
sudo pacman -S java-runtime-common jre-openjdk xdotool --noconfirm --needed
sudo pacman -S neovim libftdi ccfits adobe-source-code-pro-fonts noto-fonts-extra --noconfirm --needed
sudo pacman -S python acpi python-pip samba opencv gtest gmock libmpdclient binutils keychain --needed --noconfirm
sudo pacman -S htop pv imagemagick zlib curl exfat-utils unzip zip shadow perl-json-xs git-lfs --needed --noconfirm
sudo pacman -S zsh-syntax-highlighting xfce4-power-manager openvpn zsh-autosuggestions starship calc diff-so-fancy networkmanager-openvpn powerline-fonts zathura zathura-cb zathura-pdf-mupdf zathura-ps lynx ttf-dejavu --needed --noconfirm
sudo pacman -S dkms btop gnupg pcsclite ccid yubikey-manager yubikey-personalization --needed --noconfirm
sudo pacman -S keyutils bison openconnect ksshaskpass --needed --noconfirm
sudo pacman -S ttf-liberation kitty libvips lftp npm linux-firmware-marvell fwupd --needed --noconfirm
sudo pacman -S webkit2gtk qt5ct qt6ct kvantum kvantum-qt5 otf-font-awesome ddcutil jq polkit --needed --noconfirm
sudo pacman -S sassc cargo luarocks shfmt lm_sensors thefuck --needed --noconfirm
sudo pacman -S neomutt isync mailcap w3m github-cli mermaid-cli astyle --needed --noconfirm
gh ext install meiji163/gh-notify
gh ext upgrade meiji163/gh-notify
# Install Architecture specific stuff
if [ "$isArm" = false ] ; then
sudo pacman -S gtop --noconfirm --needed
fi
git lfs install
git lfs pull
echo "Changing default shell to zsh"
if [[ "$SHELL" != "/usr/bin/zsh" ]]; then
chsh -s /usr/bin/zsh
fi
echo "Setting up oh-my-zsh ..."
if [ ! -d ${ZSH} ]; then
sh -c "$(wget https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh -O -)"
fi
echo "Setting up vim..."
BasicNvimInstall
echo "Setting up git"
if grep -q "gitalias" "$HOME/.gitconfig" ; then
echo "Git aliases already set up"
else
echo "[include]" >> ~/.gitconfig
echo " path = ~/.scripts/gitalias" >> ~/.gitconfig
fi
if grep -q "gitconfig" "$HOME/.gitconfig" ; then
echo "Git config already set up"
else
echo "[include]" >> ~/.gitconfig
echo " path = ~/.scripts/gitconfig" >> ~/.gitconfig
fi
echo "Installing AUR packages"
InstallAurPackage "dcron" "https://aur.archlinux.org/dcron.git"
InstallAurPackage "nomacs" "https://aur.archlinux.org/nomacs.git"
InstallAurPackage "ddcui" "https://aur.archlinux.org/ddcui.git"
InstallAurPackage "svp-bin" "https://aur.archlinux.org/svp-bin.git"
InstallAurPackage "go-chroma-bin" "https://aur.archlinux.org/go-chroma-bin.git"
InstallAurPackage "zen-browser-bin" "https://aur.archlinux.org/zen-browser-bin.git"
echo "Installing wallust"
cargo install wallust
sudo cp /home/cobra/.local/share/cargo/bin/wallust /usr/bin
sudo chown root:root /usr/bin/wallust
echo "Setting up Display Manager"
InstallSddm
echo "Scanning for fans"
if [[ ! -f /etc/conf.d/lm_sensors ]]; then
sudo sensors-detect --auto
fi
# Needed key for autofs
gpg --fetch-keys https://keyserver.ubuntu.com/pks/lookup\?op\=get\&search\=0xcd0a6e3cbb6768800b0736a8e7677380f54fd8a9
InstallAurPackage "autofs" "https://aur.archlinux.org/autofs.git"
echo "Downloading your public key"
gpg --recv 0xC7EDA753BB012095
echo "Enabling services ..."
sudo systemctl enable dcron
sudo systemctl start dcron
sudo systemctl enable autofs
sudo systemctl start autofs
sudo systemctl start polkit.service
sudo systemctl enable polkit.service
sudo systemctl enable NetworkManager
sudo systemctl start NetworkManager
sudo systemctl enable udisks2 # Needed for fwupd to be able to update bios
sudo systemctl enable pcscd
sudo systemctl start pcscd
echo "Enabled ntp timesync"
sudo timedatectl set-ntp 1
echo "Applying default cron-config ..."
crontab $HOME/.config/defaultCronConfig
echo "Copying some default files ..."
sudo rm -rf /usr/share/backgrounds/*
SetupBackgroundsFolderForBing
sh ~/.scripts/updateLoginBackground.sh # Execute it ones, to get a new background
echo "Updating gpg-agent"
echo "UPDATESTARTUPTTY" | gpg-connect-agent > /dev/null 2>&1
# Install GTK themes
gsettings set org.gnome.desktop.interface color-scheme 'prefer-dark'
InstallAurPackage "colloid-gtk-theme-git" "https://aur.archlinux.org/colloid-gtk-theme-git.git"
InstallAurPackage "colloid-icon-theme-git" "https://aur.archlinux.org/colloid-icon-theme-git.git"
InstallAurPackage "kanagawa-gtk-theme-git" "https://aur.archlinux.org/kanagawa-gtk-theme-git.git"
InstallAurPackage "rose-pine-hyprcursor" "https://aur.archlinux.org/rose-pine-hyprcursor.git"
InstallAurPackage "rose-pine-cursor" "https://aur.archlinux.org/rose-pine-cursor.git"
InstallAurPackage "hyprcursor-dracula-kde-git" "https://aur.archlinux.org/hyprcursor-dracula-kde-git.git"
InstallAurPackage "adwaita-qt-git" "https://aur.archlinux.org/adwaita-qt-git.git"
gpg --recv-keys 2C393E0F18A9236D
InstallAurPackage "youtube-dl" "https://aur.archlinux.org/youtube-dl.git"
echo "Updating QT theming"
SetupQTTheming
SetupClamAV
SetupMachineGpgKey