1
0
mirror of https://github.com/tommytran732/QubesOS-Scripts synced 2024-11-24 02:21:35 -05:00

Fix Debian scripts

This commit is contained in:
Tommy 2024-11-12 01:36:55 -07:00 committed by GitHub
parent 08cbe37868
commit b5113b3b93
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 18 additions and 12 deletions

View File

@ -14,7 +14,7 @@
# License for the specific language governing permissions and limitations under # License for the specific language governing permissions and limitations under
# the License. # the License.
set -eu -o pipefail set -eu
unpriv(){ unpriv(){
sudo -u nobody "${@}" sudo -u nobody "${@}"
@ -29,11 +29,11 @@ download() {
sudo systemctl mask debug-shell.service sudo systemctl mask debug-shell.service
# Setting umask to 077 # Setting umask to 077
# Does not actually work for some reason - need to check # Kicksecure defaults to zsh - I need to set it for zsh later.
umask 077 umask 077
sudo sed -i 's/^UMASK.*/UMASK 077/g' /etc/login.defs sudo sed -i 's/^UMASK.*/UMASK 077/g' /etc/login.defs
sudo sed -i 's/^HOME_MODE/#HOME_MODE/g' /etc/login.defs sudo sed -i 's/^HOME_MODE/#HOME_MODE/g' /etc/login.defs
sudo sed -i 's/umask 022/umask 077/g' /etc/bashrc echo 'umask 077' | sudo tee -a /etc/bash.bashrc
# Make home directory private # Make home directory private
sudo chmod 700 /home/* sudo chmod 700 /home/*
@ -47,7 +47,7 @@ download https://raw.githubusercontent.com/TommyTran732/Linux-Setup-Scripts/main
# Setup dconf # Setup dconf
umask 022 umask 022
mkdir -p /etc/dconf/db/local.d/locks sudo mkdir -p /etc/dconf/db/local.d/locks
download https://raw.githubusercontent.com/TommyTran732/Linux-Setup-Scripts/main/etc/dconf/db/local.d/locks/automount-disable /etc/dconf/db/local.d/locks/automount-disable download https://raw.githubusercontent.com/TommyTran732/Linux-Setup-Scripts/main/etc/dconf/db/local.d/locks/automount-disable /etc/dconf/db/local.d/locks/automount-disable
download https://raw.githubusercontent.com/TommyTran732/Linux-Setup-Scripts/main/etc/dconf/db/local.d/locks/privacy /etc/dconf/db/local.d/locks/privacy download https://raw.githubusercontent.com/TommyTran732/Linux-Setup-Scripts/main/etc/dconf/db/local.d/locks/privacy /etc/dconf/db/local.d/locks/privacy
@ -123,8 +123,14 @@ sudo extrepo disable kicksecure
sudo mv /etc/apt/sources.list ~/ sudo mv /etc/apt/sources.list ~/
sudo touch /etc/apt/sources.list sudo touch /etc/apt/sources.list
#Enabling SUID Disabler and Permission Hardener # adw-gtk3 theme repo
sudo systemctl enable --now permission-hardening curl -s --proxy http://127.0.0.1:8082 https://julianfairfax.codeberg.page/package-repo/pub.gpg | gpg --dearmor | sudo dd of=/usr/share/keyrings/julians-package-repo.gpg
echo 'Types: deb
URIs: https://julianfairfax.codeberg.page/package-repo/debs
Suites: packages
Components: main
Signed-By: /usr/share/keyrings/julians-package-repo.gpg' | sudo tee /etc/apt/sources.list.d/julians-package-repo.list
# Restrict /proc and access # Restrict /proc and access
sudo systemctl enable --now proc-hidepid.service sudo systemctl enable --now proc-hidepid.service
@ -134,7 +140,7 @@ sudo systemctl enable --now proc-hidepid.service
sudo systemctl enable --now hide-hardware-info.service sudo systemctl enable --now hide-hardware-info.service
# Install packages # Install packages
sudo apt install --no-install-recommends adw-gtk3-theme gnome-console loupe qubes-ctap qubes-gpg-split -y sudo apt install --no-install-recommends adw-gtk3-theme gnome-console qubes-ctap qubes-gpg-split -y
# Flatpak update service # Flatpak update service
download https://raw.githubusercontent.com/TommyTran732/QubesOS-Scripts/main/etc/systemd/user/update-user-flatpaks.service /etc/systemd/user/update-user-flatpaks.service download https://raw.githubusercontent.com/TommyTran732/QubesOS-Scripts/main/etc/systemd/user/update-user-flatpaks.service /etc/systemd/user/update-user-flatpaks.service

View File

@ -1,6 +1,6 @@
#!/bin/sh #!/bin/sh
set -eu -o pipefail set -eu
unpriv(){ unpriv(){
sudo -u nobody "${@}" sudo -u nobody "${@}"

View File

@ -25,11 +25,11 @@ download() {
} }
# Setting umask to 077 # Setting umask to 077
# Does not actually work for some reason - need to check # Whonix defaults to zsh - I need to set it for zsh later.
umask 077 umask 077
sudo sed -i 's/^UMASK.*/UMASK 077/g' /etc/login.defs sudo sed -i 's/^UMASK.*/UMASK 077/g' /etc/login.defs
sudo sed -i 's/^HOME_MODE/#HOME_MODE/g' /etc/login.defs sudo sed -i 's/^HOME_MODE/#HOME_MODE/g' /etc/login.defs
sudo sed -i 's/umask 022/umask 077/g' /etc/bash.bashrc echo 'umask 077' | sudo tee -a /etc/bash.bashrc
# Make home directory private # Make home directory private
sudo chmod 700 /home/* sudo chmod 700 /home/*

View File

@ -25,11 +25,11 @@ download() {
} }
# Setting umask to 077 # Setting umask to 077
# Does not actually work for some reason - need to check # Whonix defaults to zsh - I need to set it for zsh later.
umask 077 umask 077
sudo sed -i 's/^UMASK.*/UMASK 077/g' /etc/login.defs sudo sed -i 's/^UMASK.*/UMASK 077/g' /etc/login.defs
sudo sed -i 's/^HOME_MODE/#HOME_MODE/g' /etc/login.defs sudo sed -i 's/^HOME_MODE/#HOME_MODE/g' /etc/login.defs
sudo sed -i 's/umask 022/umask 077/g' /etc/bash.bashrc echo 'umask 077' | sudo tee -a /etc/bash.bashrc
# Make home directory private # Make home directory private
sudo chmod 700 /home/* sudo chmod 700 /home/*