1
0
mirror of https://github.com/tommytran732/QubesOS-Scripts synced 2024-11-25 02:51:33 -05:00
QubesOS-Scripts/kicksecure/kicksecure.sh

79 lines
2.4 KiB
Bash
Raw Normal View History

2022-05-26 16:43:33 -04:00
#!/bin/bash
#Adding KickSecure's signing key
curl --proxy http://127.0.0.1:8082/ --tlsv1.3 --proto =https --max-time 180 --output ~/derivative.asc https://www.kicksecure.com/derivative.asc
sudo cp ~/derivative.asc /usr/share/keyrings/derivative.asc
echo "deb [signed-by=/usr/share/keyrings/derivative.asc] https://deb.kicksecure.com bullseye main contrib non-free" | sudo tee /etc/apt/sources.list.d/derivative.list
2022-06-14 21:44:38 -04:00
sudo apt update
2022-05-26 16:43:33 -04:00
2022-05-26 16:52:43 -04:00
#Debloat
2022-05-26 22:31:56 -04:00
sudo apt purge -y thunderbird emacs emacs-gtk emacs-bin-common emacs-common firefox* keepassxc cups* system-config-printer* xsettingsd yelp*
2022-05-26 16:52:43 -04:00
sudo apt autoremove -y
sudo apt autoclean
2022-05-26 16:43:33 -04:00
#Distribution morphing
sudo apt install --no-install-recommends kicksecure-qubes-cli -y
2022-05-26 22:31:56 -04:00
sudo apt autoremove -y
2022-05-26 16:43:33 -04:00
sudo mv /etc/apt/sources.list ~/
sudo touch /etc/apt/sources.list
#Enabling SUID Disabler and Permission Hardener
sudo systemctl enable --now permission-hardening
#Install LKRG
2022-06-14 20:29:14 -04:00
sudo apt install --no-install-recommends linux-headers-amd64 lkrg-dkms -y
2022-05-26 16:43:33 -04:00
#Enable hardened malloc
echo "/usr/lib/libhardened_malloc.so/libhardened_malloc.so" | sudo tee /etc/ld.so.preload
2022-07-02 21:49:05 -04:00
#Restrict /proc and access
sudo systemctl enable --now proc-hidepid.service
2022-05-26 16:43:33 -04:00
#Reduce kernel information leaks
2022-05-26 18:09:59 -04:00
#Will break a lot of applications. The apps I use on KickSecure work fine with it so I am enabling it.
2022-05-26 16:43:33 -04:00
sudo systemctl enable --now hide-hardware-info.service
2022-05-26 18:08:54 -04:00
#Install packages
2022-05-26 19:43:44 -04:00
sudo apt install --no-install-recommends qubes-gpg-split qubes-u2f eog qt5ct qt5-style-plugins arc-theme -y
2022-05-26 16:43:33 -04:00
2022-05-26 18:08:54 -04:00
#Theming
2022-05-26 16:43:33 -04:00
git config --global http.proxy http://127.0.0.1:8082
git clone https://github.com/horst3180/arc-icon-theme
2022-05-26 19:43:44 -04:00
sudo mv arc-icon-theme/Arc /usr/share/icons
2022-05-26 16:43:33 -04:00
rm -rf arc-icon-theme
2022-05-26 17:39:47 -04:00
echo "export QT_QPA_PLATFORMTHEME=gtk2" | sudo tee /etc/environment
2022-05-26 16:43:33 -04:00
2022-07-02 22:24:07 -04:00
sudo mkdir -p /etc/gtk-3.0
2022-05-26 17:41:00 -04:00
echo "[Settings]
2022-05-26 16:43:33 -04:00
gtk-theme-name=Arc-Dark
2022-05-26 19:43:44 -04:00
gtk-application-prefer-dark-theme=1
2022-05-30 18:39:18 -04:00
gtk-icon-theme-name=Arc" | sudo tee /etc/gtk-3.0/settings.ini
2022-05-26 16:43:33 -04:00
2022-07-02 22:24:07 -04:00
sudo mkdir -p /etc/gtk-4.0
2022-05-26 17:41:00 -04:00
echo "[Settings]
2022-05-26 16:43:33 -04:00
gtk-theme-name=Arc-Dark
2022-05-26 19:43:44 -04:00
gtk-application-prefer-dark-theme=1
gtk-icon-theme-name=Arc" | sudo tee /etc/gtk-4.0/settings.ini
2022-05-26 16:43:33 -04:00
2022-05-26 19:43:44 -04:00
#Flatpak update service
2022-05-26 16:43:33 -04:00
2022-05-26 17:39:47 -04:00
echo "[Unit]
2022-05-26 16:43:33 -04:00
Description=Update user Flatpaks
[Service]
Type=oneshot
ExecStart=/usr/bin/flatpak --user update -y
[Install]
2022-05-26 17:39:47 -04:00
WantedBy=default.target" | sudo tee /etc/systemd/user/update-user-flatpaks.service
2022-05-26 16:43:33 -04:00
2022-05-26 17:39:47 -04:00
echo "[Unit]
2022-05-26 16:43:33 -04:00
Description=Update user Flatpaks daily
[Timer]
OnCalendar=daily
Persistent=true
[Install]
2022-06-14 20:24:27 -04:00
WantedBy=timers.target" | sudo tee /etc/systemd/user/update-user-flatpaks.timer