aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorawy <awy@awy.one>2024-12-14 23:12:02 +0300
committerawy <awy@awy.one>2024-12-14 23:12:02 +0300
commit98c733853f376150945e61a1c90ff4e417a46e5d (patch)
tree492f9bc60901309e0de1e4bae4a5d259b05ab2d5
parent92ced0cecf21e00dd8f425bb387f022077ad7cdb (diff)
update
-rw-r--r--aurdeps.txt7
-rwxr-xr-xrice.sh69
2 files changed, 62 insertions, 14 deletions
diff --git a/aurdeps.txt b/aurdeps.txt
new file mode 100644
index 0000000..a12e9d1
--- /dev/null
+++ b/aurdeps.txt
@@ -0,0 +1,7 @@
+tessen
+sing-box
+sing-geoip-db
+sing-geoip-rule-set
+sing-geosite-db
+sing-geosite-rule-set
+gpu-screen-recorder
diff --git a/rice.sh b/rice.sh
index 1ae18df..ca6d40e 100755
--- a/rice.sh
+++ b/rice.sh
@@ -17,22 +17,13 @@ doas -u $PERMUSER cp -r "$WORKDIRECTORY"/.config /home/$PERMUSER
doas -u $PERMUSER cp -r "$WORKDIRECTORY"/.local /home/$PERMUSER
doas -u $PERMUSER cp -a "$WORKDIRECTORY"/.zprofile /home/$PERMUSER
+doas -u $PERMUSER mkdir -p /home/$PERMUSER/.config/git
+doas -u $PERMUSER mkdir -p /home/$PERMUSER/.config/npm
+doas -u $PERMUSER touch /home/$PERMUSER/.config/npm/npmrc
doas -u $PERMUSER mkdir -p /home/$PERMUSER/.cache/lf
doas -u $PERMUSER mkdir -p /home/$PERMUSER/.cache/zsh
doas -u $PERMUSER mkdir -p /home/$PERMUSER/.local/share/themes
doas -u $PERMUSER mkdir -p /home/$PERMUSER/.local/share/icons
-doas -u $PERMUSER mkdir -p /home/$PERMUSER/.local/share/fonts
-
-cd "$WORKDIRECTORY" || exit
-doas -u $PERMUSER git clone https://github.com/awnrt/gruvbox-gtk-theme
-doas -u $PERMUSER cp -r gruvbox-gtk-theme/Gruvbox-Dark /home/$PERMUSER/.local/share/themes
-doas -u $PERMUSER cp -r gruvbox-gtk-theme/Gruvbox-Icons /home/$PERMUSER/.local/share/icons
-doas -u $PERMUSER cp -r gruvbox-gtk-theme/RobotoSerif-VariableFont_GRAD,opsz,wdth,wght.ttf /home/$PERMUSER/.local/share/fonts
-
-doas -u $PERMUSER dbus-launch gsettings set org.gnome.desktop.interface gtk-theme "Gruvbox-Dark"
-doas -u $PERMUSER dbus-launch gsettings set org.gnome.desktop.interface icon-theme "Gruvbox-Icons"
-doas -u $PERMUSER dbus-launch gsettings set org.gnome.desktop.wm.preferences button-layout 'appmenu'
-doas -u $PERMUSER dbus-launch gsettings set org.gnome.desktop.interface font-name "Roboto 11"
cd "$WORKDIRECTORY" || exit
doas -u $PERMUSER git clone https://github.com/zdharma-continuum/fast-syntax-highlighting
@@ -40,8 +31,7 @@ doas -u $PERMUSER git clone https://github.com/zdharma-continuum/fast-syntax-hig
mkdir -p /usr/share/zsh/plugins
cp -rf fast-syntax-highlighting /usr/share/zsh/plugins
#cp -rf fzf-tab /usr/share/zsh/plugins
-cd ..
-rm -rf hyprdots
+cd "$WORKDIRECTORY"
doas -u $PERMUSER mkdir -p /home/$PERMUSER/.ssh
doas -u $PERMUSER mkdir -p /home/$PERMUSER/.gnupg
@@ -54,6 +44,18 @@ default-cache-ttl 34560000
max-cache-ttl 34560000
EOL
+cat <<EOL >> /home/$PERMUSER/.config/npm/npmrc
+prefix=\${XDG_DATA_HOME}/npm
+cache=\${XDG_CACHE_HOME}/npm
+init-module=\${XDG_CONFIG_HOME}/npm/config/npm-init.js
+logs-dir=\${XDG_STATE_HOME}/npm/logs
+EOL
+
+doas -u $PERMUSER find /home/$PERMUSER/.gnupg -type f -exec chmod 600 {} \;
+doas -u $PERMUSER find /home/$PERMUSER/.gnupg -type d -exec chmod 700 {} \;
+doas -u $PERMUSER find /home/$PERMUSER/.ssh -type f -exec chmod 600 {} \;
+doas -u $PERMUSER find /home/$PERMUSER/.ssh -type d -exec chmod 700 {} \;
+
chsh -s /bin/zsh $PERMUSER
mkdir -p /root/.config/nvim
@@ -67,4 +69,43 @@ EOL
sed -i -e "/^#"Color"/s/^#//" /etc/pacman.conf
sed -i -e '/Color/a\ILoveCandy' /etc/pacman.conf
+rm /home/$PERMUSER/.bash*
+
+# makeflags set to number of threads and pacman elevation is doas
+sed -i 's/#MAKEFLAGS=.*$/MAKEFLAGS="-j'$(nproc)'"/' /etc/makepkg.conf
+sed -i 's/#PACMAN_AUTH=.*$/PACMAN_AUTH=(doas)/' /etc/makepkg.conf
+doas -u $PERMUSER git clone https://aur.archlinux.org/yay.git
+cd yay
+doas -u $PERMUSER makepkg -csi --noconfirm
+cd "$WORKDIRECTORY"
+DEPLIST="`sed -e 's/#.*$//' -e '/^$/d' aurdeps.txt | tr '\n' ' '`"
+doas -u $PERMUSER yay -S $DEPLIST --noconfirm
+doas -u $PERMUSER git clone https://github.com/awnrt/gruvbox-gtk-theme
+doas -u $PERMUSER cp -r gruvbox-gtk-theme/Gruvbox-Dark /home/$PERMUSER/.local/share/themes
+doas -u $PERMUSER cp -r gruvbox-gtk-theme/Gruvbox-Icons /home/$PERMUSER/.local/share/icons
+doas -u $PERMUSER dbus-launch gsettings set org.gnome.desktop.interface gtk-theme "Gruvbox-Dark"
+doas -u $PERMUSER dbus-launch gsettings set org.gnome.desktop.wm.preferences theme "Gruvbox-Dark"
+doas -u $PERMUSER dbus-launch gsettings set org.gnome.desktop.interface icon-theme "Gruvbox-Icons"
+doas -u $PERMUSER dbus-launch gsettings set org.gnome.desktop.wm.preferences button-layout 'appmenu'
+doas -u $PERMUSER dbus-launch gsettings set org.gnome.desktop.interface font-name "Sans 11"
+cd ..
+rm -rf hyprdots
+rm -rf yay
+rm -rf go
+
+dinitctl enable cronie
+echo "*/10 * * * * /home/$PERMUSER/.local/bin/cron/newsup\n*/30 * * * * /home/$PERMUSER/.local/bin/cron/checkup" | doas -u $PERMUSER crontab -
+
+cat <<EOL >> /usr/share/libalpm/hooks/statusbar.hook
+[Trigger]
+Operation = Upgrade
+Type = Package
+Target = *
+
+[Action]
+Description = Updating statusbar...
+When = PostTransaction
+Exec = /usr/bin/pkill -RTMIN+8 waybar
+EOL
+
echo "Your linux is riced!"