1
0
mirror of https://github.com/tommytran732/QubesOS-Scripts synced 2024-11-22 09:51:32 -05:00

Compare commits

...

12 Commits

Author SHA1 Message Date
6b7dacda7c
Add comments
Signed-off-by: Tommy <contact@tommytran.io>
2024-04-26 16:37:33 -07:00
3974e569df
Do not overwrite /etc/environment
Signed-off-by: Tommy <contact@tommytran.io>
2024-04-26 16:21:13 -07:00
4ba0f414f1
Styling fix
Signed-off-by: Tommy <contact@tommytran.io>
2024-04-26 16:12:38 -07:00
73b7a097a6
qubes-u2f-dom0 is now qubes-ctap-dom0
Signed-off-by: Tommy <contact@tommytran.io>
2024-04-26 16:11:39 -07:00
c3c6383a56
Remove old split ssh hack
Signed-off-by: Tommy <contact@tommytran.io>
2024-04-26 16:01:35 -07:00
c4034e5976
Remove /etc/hosts hardcode
Signed-off-by: Tommy <contact@tommytran.io>
2024-04-26 15:58:59 -07:00
1bc739ce76
Flatpak updater service does not need to be wanted by any target
Signed-off-by: Tommy <contact@tommytran.io>
2024-04-26 15:58:16 -07:00
683b8a8642
Remove hardened_malloc from Kicksecure
Signed-off-by: Tommy <contact@tommytran.io>
2024-04-26 15:56:35 -07:00
c6601ba890
Disbale msr in Fedora
Signed-off-by: Tommy <contact@tommytran.io>
2024-04-26 15:55:51 -07:00
208ea8a25c
Remove hardened_malloc from Whonix
Signed-off-by: Tommy <contact@tommytran.io>
2024-04-26 15:53:42 -07:00
5a560307da
Remove Signal
Signed-off-by: Tommy <contact@tommytran.io>
2024-04-26 15:52:44 -07:00
1c37f71ac4
Typo Fix
Signed-off-by: Tommy <contact@tommytran.io>
2024-04-26 15:52:06 -07:00
9 changed files with 16 additions and 73 deletions

20
dom0.sh
View File

@ -20,16 +20,20 @@ sudo systemctl enable fstrim.timer
# Theming
# After a reboot, run qt5ct and set the theme to gtk-2
sudo qubes-dom0-update qubes-ctap-dom0 qt5ct qt5-qtstyleplugins
echo 'QT_QPA_PLATFORMTHEME=qt5ct' | sudo tee -a /etc/environment
# Add extra gtk theming - this is probably not necessary, but why not
sudo mkdir -p /etc/gtk-3.0
echo "[Settings]
echo '[Settings]
gtk-theme-name=Arc-Dark
gtk-application-prefer-dark-theme=1" | sudo tee /etc/gtk-3.0/settings.ini
gtk-application-prefer-dark-theme=1' | sudo tee /etc/gtk-3.0/settings.ini
sudo mkdir -p /etc/gtk-4.0
echo "[Settings]
echo '[Settings]
gtk-theme-name=Arc-Dark
gtk-application-prefer-dark-theme=1" | sudo tee /etc/gtk-3.0/settings.ini
sudo qubes-dom0-update qubes-u2f-dom0 qt5ct qt5-qtstyleplugins
echo "QT_QPA_PLATFORMTHEME=qt5ct" | sudo tee /etc/environment
gtk-application-prefer-dark-theme=1' | sudo tee /etc/gtk-4.0/settings.ini

View File

@ -23,6 +23,6 @@ sudo sed -i 's/kernel.yama.ptrace_scope=2/kernel.yama.ptrace_scope=3/g' /etc/sys
curl --proxy http://127.00.1:8082 https://raw.githubusercontent.com/Kicksecure/security-misc/master/usr/lib/sysctl.d/30_silent-kernel-printk.conf | sudo tee /etc/sysctl.d/30_silent-kernel-printk.conf
curl --proxy http://127.00.1:8082 https://raw.githubusercontent.com/Kicksecure/security-misc/master/usr/lib/sysctl.d/30_security-misc_kexec-disable.conf | sudo tee /etc/sysctl.d/30_security-misc_kexec-disable.conf
#Setup SSH client
# Setup SSH client
echo "GSSAPIAuthentication no" > /etc/ssh/ssh_config.d/10-custom.conf
echo "VerifyHostKeyDNS yes" >> /etc/ssh/ssh_config.d/10-custom.conf

View File

@ -46,6 +46,7 @@ echo "countme=False" | sudo tee -a /etc/dnf/dnf.conf
# Blacklisting kernel modules
curl --proxy http://127.0.0.1:8082 https://raw.githubusercontent.com/Kicksecure/security-misc/master/etc/modprobe.d/30_security-misc.conf | sudo tee /etc/modprobe.d/30_security-misc.conf
sudo sed -i 's/#install msr/install msr/g' /etc/modprobe.d/30_security-misc.conf
# Security kernel settings.
curl --proxy http://127.0.0.1:8082 https://raw.githubusercontent.com/Kicksecure/security-misc/master/usr/lib/sysctl.d/990-security-misc.conf | sudo tee /etc/sysctl.d/990-security-misc.conf
@ -85,10 +86,7 @@ Description=Update user Flatpaks
[Service]
Type=oneshot
ExecStart=/usr/bin/flatpak --user update -y
[Install]
WantedBy=default.target" | sudo tee /etc/systemd/user/update-user-flatpaks.service
ExecStart=/usr/bin/flatpak --user update -y" | sudo tee /etc/systemd/user/update-user-flatpaks.service
echo "[Unit]
Description=Update user Flatpaks daily

View File

@ -1,23 +0,0 @@
#!/bin/bash
#Run this in an AppVM, not a TemplateVM
echo '# SPLIT SSH CONFIGURATION >>>
# replace "vault" with your AppVM name which stores the ssh private key(s)
SSH_VAULT_VM="vault"
if [ "$SSH_VAULT_VM" != "" ]; then
export SSH_SOCK="/home/user/.SSH_AGENT_$SSH_VAULT_VM"
rm -f "$SSH_SOCK"
sudo -u user /bin/sh -c "umask 177 && exec socat 'UNIX-LISTEN:$SSH_SOCK,fork' 'EXEC:qrexec-client-vm $SSH_VAULT_VM qubes.SshAgent'" &
fi
# <<< SPLIT SSH CONFIGURATION' | sudo tee -a /rw/config/rc.local
echo '# SPLIT SSH CONFIGURATION >>>
# replace "vault" with your AppVM name which stores the ssh private key(s)
SSH_VAULT_VM="vault"
if [ "$SSH_VAULT_VM" != "" ]; then
export SSH_AUTH_SOCK="/home/user/.SSH_AGENT_$SSH_VAULT_VM"
fi
# <<< SPLIT SSH CONFIGURATION' | tee -a ~/.bashrc

View File

@ -18,6 +18,3 @@ curl --proxy http://127.0.0.1:8082/ https://packages.element.io/debian/element-i
echo "deb [signed-by=/usr/share/keyrings/element-io-archive-keyring.gpg] https://packages.element.io/debian/ default main" | sudo tee /etc/apt/sources.list.d/element-io.list
sudo apt update
sudo apt install --no-install-recommends element-desktop -y
# Adding a DNS entry for my Matrix server here so I can add a Firewall rule locking the AppVM to only being able to connect to my server.
echo "5.226.143.168 matrix.arcticfoxes.net" | sudo tee -a /etc/hosts

View File

@ -42,9 +42,6 @@ sudo touch /etc/apt/sources.list
#E nabling SUID Disabler and Permission Hardener
sudo systemctl enable --now permission-hardening
# Enable hardened malloc
echo "/usr/lib/libhardened_malloc.so/libhardened_malloc.so" | sudo tee /etc/ld.so.preload
# Restrict /proc and access
sudo systemctl enable --now proc-hidepid.service
@ -83,10 +80,7 @@ Description=Update user Flatpaks
[Service]
Type=oneshot
ExecStart=/usr/bin/flatpak --user update -y
[Install]
WantedBy=default.target" | sudo tee /etc/systemd/user/update-user-flatpaks.service
ExecStart=/usr/bin/flatpak --user update -y" | sudo tee /etc/systemd/user/update-user-flatpaks.service
echo "[Unit]
Description=Update user Flatpaks daily

View File

@ -1,21 +0,0 @@
#!/bin/bash
# Copyright (C) 2023 Thien Tran
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy of
# the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations under
# the License.
curl --proxy http://127.0.0.1:8082/ https://updates.signal.org/desktop/apt/keys.asc | gpg --dearmor > signal-desktop-keyring.gpg
cat signal-desktop-keyring.gpg | sudo tee -a /usr/share/keyrings/signal-desktop-keyring.gpg > /dev/null
echo 'deb [arch=amd64 signed-by=/usr/share/keyrings/signal-desktop-keyring.gpg] https://updates.signal.org/desktop/apt xenial main' | sudo tee -a /etc/apt/sources.list.d/signal-xenial.list
sudo apt update && sudo apt install --no-install-recommends signal-desktop -y

View File

@ -28,9 +28,6 @@ sudo apt install --no-install-recommends tirdad qt5ct qt5-style-plugins arc-them
# Enabling SUID Disabler and Permission Hardener
sudo systemctl enable --now permission-hardening
# Enable hardened malloc
echo "/usr/lib/libhardened_malloc.so/libhardened_malloc.so" | sudo tee /etc/ld.so.preload
# Restrict /proc and access
sudo systemctl enable --now proc-hidepid.service

View File

@ -28,9 +28,6 @@ sudo apt install --no-install-recommends tirdad qt5ct qt5-style-plugins arc-them
# Enabling SUID Disabler and Permission Hardener
sudo systemctl enable --now permission-hardening
# Enable hardened malloc
echo "/usr/lib/libhardened_malloc.so/libhardened_malloc.so" | sudo tee /etc/ld.so.preload
# Restrict /proc and access
sudo systemctl enable --now proc-hidepid.service