mirror of
https://github.com/tommytran732/QubesOS-Scripts
synced 2024-11-21 17:31:34 -05:00
Compare commits
2 Commits
60a3a87f35
...
481700d2cc
Author | SHA1 | Date | |
---|---|---|---|
481700d2cc | |||
fec32ae3f0 |
10
dom0.sh
10
dom0.sh
@ -17,15 +17,19 @@
|
|||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
# Enabling discard and fstrim
|
# Enabling discard and fstrim
|
||||||
sudo sed -i 's/issue_discards = 0/issue_discards = 1/g' /etc/lvm/lvm.conf
|
sudo sed -i 's/issue_discards = 0/issue_discards = 1/' /etc/lvm/lvm.conf
|
||||||
sudo systemctl enable --now fstrim.timer
|
sudo systemctl enable --now fstrim.timer
|
||||||
|
|
||||||
|
sudo qubes-dom0-update anti-evil-maid qubes-ctap-dom0 qt5ct qt5-qtstyleplugins
|
||||||
|
|
||||||
|
# Configure PCRs
|
||||||
|
sudo sed -i 's/ --pcr 19//' /etc/anti-evil-maid.conf
|
||||||
|
sudo sed -i 's/="/="--pcr 0 --pcr 1 --pcr 2 --pcr 3 --pcr 4 --pcr 5 /' /etc/anti-evil-maid.conf
|
||||||
|
|
||||||
# Theming
|
# Theming
|
||||||
|
|
||||||
# After a reboot, run qt5ct and set the theme to gtk-2
|
# After a reboot, run qt5ct and set the theme to gtk-2
|
||||||
|
|
||||||
sudo qubes-dom0-update anti-evil-maid qubes-ctap-dom0 qt5-qtstyleplugins
|
|
||||||
|
|
||||||
echo 'QT_QPA_PLATFORMTHEME=gtk2' | sudo tee -a /etc/environment
|
echo 'QT_QPA_PLATFORMTHEME=gtk2' | sudo tee -a /etc/environment
|
||||||
|
|
||||||
# Add extra gtk theming - this is probably not necessary, but why not
|
# Add extra gtk theming - this is probably not necessary, but why not
|
||||||
|
@ -20,7 +20,7 @@ unpriv(){
|
|||||||
sudo -u nobody "${@}"
|
sudo -u nobody "${@}"
|
||||||
}
|
}
|
||||||
|
|
||||||
dl() {
|
download() {
|
||||||
unpriv curl -s --proxy http://127.0.0.1:8082 "${1}" | sudo tee "${2}" > /dev/null
|
unpriv curl -s --proxy http://127.0.0.1:8082 "${1}" | sudo tee "${2}" > /dev/null
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -38,47 +38,47 @@ sudo sed -i 's/umask 022/umask 077/g' /etc/bashrc
|
|||||||
sudo chmod 700 /home/*
|
sudo chmod 700 /home/*
|
||||||
|
|
||||||
# Harden SSH
|
# Harden SSH
|
||||||
dl https://raw.githubusercontent.com/TommyTran732/Linux-Setup-Scripts/main/etc/ssh/ssh_config.d/10-custom.conf /etc/ssh/ssh_config.d/10-custom.conf
|
download https://raw.githubusercontent.com/TommyTran732/Linux-Setup-Scripts/main/etc/ssh/ssh_config.d/10-custom.conf /etc/ssh/ssh_config.d/10-custom.conf
|
||||||
sudo chmod 644 /etc/ssh/ssh_config.d/10-custom.conf
|
sudo chmod 644 /etc/ssh/ssh_config.d/10-custom.conf
|
||||||
|
|
||||||
# Security kernel settings
|
# Security kernel settings
|
||||||
dl https://raw.githubusercontent.com/secureblue/secureblue/live/files/system/etc/modprobe.d/blacklist.conf /etc/modprobe.d/workstation-blacklist.conf
|
download https://raw.githubusercontent.com/secureblue/secureblue/live/files/system/etc/modprobe.d/blacklist.conf /etc/modprobe.d/workstation-blacklist.conf
|
||||||
sudo chmod 644 /etc/modprobe.d/workstation-blacklist.conf
|
sudo chmod 644 /etc/modprobe.d/workstation-blacklist.conf
|
||||||
dl https://raw.githubusercontent.com/TommyTran732/Linux-Setup-Scripts/main/etc/sysctl.d/99-workstation.conf /etc/sysctl.d/99-workstation.conf
|
download https://raw.githubusercontent.com/TommyTran732/Linux-Setup-Scripts/main/etc/sysctl.d/99-workstation.conf /etc/sysctl.d/99-workstation.conf
|
||||||
sudo chmod 644 /etc/sysctl.d/99-workstation.conf
|
sudo chmod 644 /etc/sysctl.d/99-workstation.conf
|
||||||
# Dracut doesn't seem to work - need to investigate
|
# Dracut doesn't seem to work - need to investigate
|
||||||
# dracut -f
|
# dracut -f
|
||||||
sudo sysctl -p
|
sudo sysctl -p
|
||||||
|
|
||||||
# Disable coredump
|
# Disable coredump
|
||||||
dl https://raw.githubusercontent.com/TommyTran732/Linux-Setup-Scripts/main/etc/security/limits.d/30-disable-coredump.conf /etc/security/limits.d/30-disable-coredump.conf
|
download https://raw.githubusercontent.com/TommyTran732/Linux-Setup-Scripts/main/etc/security/limits.d/30-disable-coredump.conf /etc/security/limits.d/30-disable-coredump.conf
|
||||||
sudo chmod 644 /etc/security/limits.d/30-disable-coredump.conf
|
sudo chmod 644 /etc/security/limits.d/30-disable-coredump.conf
|
||||||
sudo mkdir -p /etc/systemd/coredump.conf.d
|
sudo mkdir -p /etc/systemd/coredump.conf.d
|
||||||
sudo chmod 755 /etc/systemd/coredump.conf.d
|
sudo chmod 755 /etc/systemd/coredump.conf.d
|
||||||
dl https://raw.githubusercontent.com/TommyTran732/Linux-Setup-Scripts/main/etc/systemd/coredump.conf.d/disable.conf /etc/systemd/coredump.conf.d/disable.conf
|
download https://raw.githubusercontent.com/TommyTran732/Linux-Setup-Scripts/main/etc/systemd/coredump.conf.d/disable.conf /etc/systemd/coredump.conf.d/disable.conf
|
||||||
sudo chmod 644 /etc/systemd/coredump.conf.d/disable.conf
|
sudo chmod 644 /etc/systemd/coredump.conf.d/disable.conf
|
||||||
|
|
||||||
# Setup dconf
|
# Setup dconf
|
||||||
umask 022
|
umask 022
|
||||||
mkdir -p /etc/dconf/db/local.d/locks
|
mkdir -p /etc/dconf/db/local.d/locks
|
||||||
|
|
||||||
dl 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
|
||||||
dl 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
|
||||||
|
|
||||||
dl https://raw.githubusercontent.com/TommyTran732/Linux-Setup-Scripts/main/etc/dconf/db/local.d/adw-gtk3-dark /etc/dconf/db/local.d/adw-gtk3-dark
|
download https://raw.githubusercontent.com/TommyTran732/Linux-Setup-Scripts/main/etc/dconf/db/local.d/adw-gtk3-dark /etc/dconf/db/local.d/adw-gtk3-dark
|
||||||
dl https://raw.githubusercontent.com/TommyTran732/Linux-Setup-Scripts/main/etc/dconf/db/local.d/automount-disable /etc/dconf/db/local.d/automount-disable
|
download https://raw.githubusercontent.com/TommyTran732/Linux-Setup-Scripts/main/etc/dconf/db/local.d/automount-disable /etc/dconf/db/local.d/automount-disable
|
||||||
dl https://raw.githubusercontent.com/TommyTran732/Linux-Setup-Scripts/main/etc/dconf/db/local.d/prefer-dark /etc/dconf/db/local.d/prefer-dark
|
download https://raw.githubusercontent.com/TommyTran732/Linux-Setup-Scripts/main/etc/dconf/db/local.d/prefer-dark /etc/dconf/db/local.d/prefer-dark
|
||||||
dl https://raw.githubusercontent.com/TommyTran732/Linux-Setup-Scripts/main/etc/dconf/db/local.d/privacy /etc/dconf/db/local.d/privacy
|
download https://raw.githubusercontent.com/TommyTran732/Linux-Setup-Scripts/main/etc/dconf/db/local.d/privacy /etc/dconf/db/local.d/privacy
|
||||||
|
|
||||||
sudo dconf update
|
sudo dconf update
|
||||||
umask 077
|
umask 077
|
||||||
|
|
||||||
# Setup ZRAM
|
# Setup ZRAM
|
||||||
dl https://raw.githubusercontent.com/TommyTran732/Linux-Setup-Scripts/main/etc/systemd/zram-generator.conf /etc/systemd/zram-generator.conf
|
download https://raw.githubusercontent.com/TommyTran732/Linux-Setup-Scripts/main/etc/systemd/zram-generator.conf /etc/systemd/zram-generator.conf
|
||||||
|
|
||||||
# Flatpak update service
|
# Flatpak update service
|
||||||
dl 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
|
||||||
dl https://raw.githubusercontent.com/TommyTran732/QubesOS-Scripts/main/etc/systemd/user/update-user-flatpaks.timer /etc/systemd/user/update-user-flatpaks.timer
|
download https://raw.githubusercontent.com/TommyTran732/QubesOS-Scripts/main/etc/systemd/user/update-user-flatpaks.timer /etc/systemd/user/update-user-flatpaks.timer
|
||||||
|
|
||||||
# Setup networking
|
# Setup networking
|
||||||
# We don't need the usual mac address randomization and stuff here, because this template is not used for sys-net
|
# We don't need the usual mac address randomization and stuff here, because this template is not used for sys-net
|
||||||
@ -90,7 +90,7 @@ dl https://raw.githubusercontent.com/TommyTran732/QubesOS-Scripts/main/etc/syste
|
|||||||
# Fix GNOME environment variable
|
# Fix GNOME environment variable
|
||||||
echo 'XDG_CURRENT_DESKTOP=GNOME' | sudo tee -a /etc/environment
|
echo 'XDG_CURRENT_DESKTOP=GNOME' | sudo tee -a /etc/environment
|
||||||
|
|
||||||
# Moving DNF handling to the bottom as the Qubes template just breaks when repos are changed and needs a reboot to fix
|
# Moving DNF handownloading to the bottom as the Qubes template just breaks when repos are changed and needs a reboot to fix
|
||||||
|
|
||||||
# Mark packages as manualy installed to avoid removal
|
# Mark packages as manualy installed to avoid removal
|
||||||
sudo dnf mark install flatpak gnome-menus qubes-menus
|
sudo dnf mark install flatpak gnome-menus qubes-menus
|
||||||
@ -146,6 +146,6 @@ echo 'libhardened_malloc.so' | sudo tee /etc/ld.so.preload
|
|||||||
sudo chmod 644 /etc/ld.so.preload
|
sudo chmod 644 /etc/ld.so.preload
|
||||||
|
|
||||||
# Setup DNF
|
# Setup DNF
|
||||||
dl https://raw.githubusercontent.com/TommyTran732/Linux-Setup-Scripts/main/etc/dnf/dnf.conf /etc/dnf/dnf.conf
|
download https://raw.githubusercontent.com/TommyTran732/Linux-Setup-Scripts/main/etc/dnf/dnf.conf /etc/dnf/dnf.conf
|
||||||
sudo sed -i 's/^metalink=.*/&\&protocol=https/g' /etc/yum.repos.d/*
|
sudo sed -i 's/^metalink=.*/&\&protocol=https/g' /etc/yum.repos.d/*
|
||||||
sudo sed -i 's/&protocol=https//g' /etc/yum.repos.d/divested-release.repo
|
sudo sed -i 's/&protocol=https//g' /etc/yum.repos.d/divested-release.repo
|
||||||
|
@ -14,10 +14,14 @@
|
|||||||
# 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
|
set -eu -o pipefail
|
||||||
|
|
||||||
unpriv(){
|
unpriv(){
|
||||||
sudo -u nobody "$@"
|
sudo -u nobody "${@}"
|
||||||
|
}
|
||||||
|
|
||||||
|
download() {
|
||||||
|
unpriv curl -s --proxy http://127.0.0.1:8082 "${1}" | sudo tee "${2}" > /dev/null
|
||||||
}
|
}
|
||||||
|
|
||||||
sudo dnf config-manager --add-repo https://repo.ivpn.net/stable/fedora/generic/ivpn.repo
|
sudo dnf config-manager --add-repo https://repo.ivpn.net/stable/fedora/generic/ivpn.repo
|
||||||
@ -29,10 +33,10 @@ sudo mkdir -p /etc/qubes-bind-dirs.d
|
|||||||
echo 'binds+=( '\'''/etc/opt/ivpn/mutable''\'' )' | sudo tee /etc/qubes-bind-dirs.d/50_user.conf
|
echo 'binds+=( '\'''/etc/opt/ivpn/mutable''\'' )' | sudo tee /etc/qubes-bind-dirs.d/50_user.conf
|
||||||
|
|
||||||
sudo mkdir /-p etc/systemd/system/systemd-resolved.service.d
|
sudo mkdir /-p etc/systemd/system/systemd-resolved.service.d
|
||||||
unpriv curl -s --proxy http://127.0.0.1:8082 https://raw.githubusercontent.com/TommyTran732/QubesOS-Scripts/main/etc/systemd/system/systemd-resolved.service.d/override.conf | sudo tee /etc/systemd/system/systemd-resolved.service.d/override.conf > /dev/null
|
download https://raw.githubusercontent.com/TommyTran732/QubesOS-Scripts/main/etc/systemd/system/systemd-resolved.service.d/override.conf /etc/systemd/system/systemd-resolved.service.d/override.conf
|
||||||
|
|
||||||
unpriv curl -s --proxy http://127.0.0.1:8082 https://raw.githubusercontent.com/TommyTran732/QubesOS-Scripts/main/etc/systemd/system/dnat-to-ns.service | sudo tee /etc/systemd/system/dnat-to-ns.service > /dev/null
|
download https://raw.githubusercontent.com/TommyTran732/QubesOS-Scripts/main/etc/systemd/system/dnat-to-ns.service /etc/systemd/system/dnat-to-ns.service
|
||||||
unpriv curl -s --proxy http://127.0.0.1:8082 https://raw.githubusercontent.com/TommyTran732/QubesOS-Scripts/main/etc/systemd/system/dnat-to-ns.path | sudo tee /etc/systemd/system/dnat-to-ns.path > /dev/null
|
download https://raw.githubusercontent.com/TommyTran732/QubesOS-Scripts/main/etc/systemd/system/dnat-to-ns.path /etc/systemd/system/dnat-to-ns.path
|
||||||
|
|
||||||
sudo systemctl enable dnat-to-ns.path
|
sudo systemctl enable dnat-to-ns.path
|
||||||
|
|
||||||
|
@ -14,7 +14,15 @@
|
|||||||
# 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
|
set -eu -o pipefail
|
||||||
|
|
||||||
|
unpriv(){
|
||||||
|
sudo -u nobody "${@}"
|
||||||
|
}
|
||||||
|
|
||||||
|
download() {
|
||||||
|
unpriv curl -s --proxy http://127.0.0.1:8082 "${1}" | sudo tee "${2}" > /dev/null
|
||||||
|
}
|
||||||
|
|
||||||
sudo dnf install -y https://github.com/manga-download/hakuneko/releases/download/nightly-20200705.1/hakuneko-desktop_8.3.4_linux_amd64.rpm
|
sudo dnf install -y https://github.com/manga-download/hakuneko/releases/download/nightly-20200705.1/hakuneko-desktop_8.3.4_linux_amd64.rpm
|
||||||
sudo dnf config-manager --enable fedora-cisco-openh264 rpmfusion-free rpmfusion-free-updates rpmfusion-nonfree rpmfusion-nonfree-updates
|
sudo dnf config-manager --enable fedora-cisco-openh264 rpmfusion-free rpmfusion-free-updates rpmfusion-nonfree rpmfusion-nonfree-updates
|
||||||
|
@ -14,7 +14,15 @@
|
|||||||
# 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
|
set -eu -o pipefail
|
||||||
|
|
||||||
|
unpriv(){
|
||||||
|
sudo -u nobody "${@}"
|
||||||
|
}
|
||||||
|
|
||||||
|
download() {
|
||||||
|
unpriv curl -s --proxy http://127.0.0.1:8082 "${1}" | sudo tee "${2}" > /dev/null
|
||||||
|
}
|
||||||
|
|
||||||
umask 022
|
umask 022
|
||||||
|
|
||||||
@ -29,8 +37,8 @@ gpgkey=https://packages.microsoft.com/keys/microsoft.asc' | sudo tee /etc/yum.re
|
|||||||
sudo dnf install -y microsoft-edge-stable
|
sudo dnf install -y microsoft-edge-stable
|
||||||
|
|
||||||
sudo mkdir -p /etc/opt/edge/policies/managed/ /etc/opt/edge/policies/recommended/
|
sudo mkdir -p /etc/opt/edge/policies/managed/ /etc/opt/edge/policies/recommended/
|
||||||
curl -s --proxy http://127.0.0.1:8082 https://raw.githubusercontent.com/TommyTran732/Microsoft-Edge-Policies/main/Linux/managed.json | sudo tee /etc/opt/edge/policies/managed/managed.json > /dev/null
|
download https://raw.githubusercontent.com/TommyTran732/Microsoft-Edge-Policies/main/Linux/managed.json /etc/opt/edge/policies/managed/managed.json
|
||||||
curl -s --proxy http://127.0.0.1:8082 https://raw.githubusercontent.com/TommyTran732/Microsoft-Edge-Policies/main/Linux/recommended.json | sudo tee /etc/opt/edge/policies/recommended/recommended.json > /dev/null
|
download https://raw.githubusercontent.com/TommyTran732/Microsoft-Edge-Policies/main/Linux/recommended.json /etc/opt/edge/policies/recommended/recommended.json
|
||||||
|
|
||||||
# Workaround for this problem: https://forum.qubes-os.org/t/upgraded-to-4-2-and-audio-no-longer-works/23130/60
|
# Workaround for this problem: https://forum.qubes-os.org/t/upgraded-to-4-2-and-audio-no-longer-works/23130/60
|
||||||
sudo dnf install -y pulseaudio-utils
|
sudo dnf install -y pulseaudio-utils
|
||||||
|
@ -14,10 +14,14 @@
|
|||||||
# 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
|
set -eu -o pipefail
|
||||||
|
|
||||||
unpriv(){
|
unpriv(){
|
||||||
sudo -u nobody "$@"
|
sudo -u nobody "${@}"
|
||||||
|
}
|
||||||
|
|
||||||
|
download() {
|
||||||
|
unpriv curl -s --proxy http://127.0.0.1:8082 "${1}" | sudo tee "${2}" > /dev/null
|
||||||
}
|
}
|
||||||
|
|
||||||
sudo dnf config-manager --add-repo https://repository.mullvad.net/rpm/stable/mullvad.repo
|
sudo dnf config-manager --add-repo https://repository.mullvad.net/rpm/stable/mullvad.repo
|
||||||
@ -29,10 +33,10 @@ sudo mkdir -p /etc/qubes-bind-dirs.d
|
|||||||
echo 'binds+=( '\'''/etc/mullvad-vpn''\'' )' | sudo tee /etc/qubes-bind-dirs.d/50_user.conf
|
echo 'binds+=( '\'''/etc/mullvad-vpn''\'' )' | sudo tee /etc/qubes-bind-dirs.d/50_user.conf
|
||||||
|
|
||||||
sudo mkdir /-p etc/systemd/system/systemd-resolved.service.d
|
sudo mkdir /-p etc/systemd/system/systemd-resolved.service.d
|
||||||
unpriv curl -s --proxy http://127.0.0.1:8082 https://raw.githubusercontent.com/TommyTran732/QubesOS-Scripts/main/etc/systemd/system/systemd-resolved.service.d/override.conf | sudo tee /etc/systemd/system/systemd-resolved.service.d/override.conf > /dev/null
|
download https://raw.githubusercontent.com/TommyTran732/QubesOS-Scripts/main/etc/systemd/system/systemd-resolved.service.d/override.conf /etc/systemd/system/systemd-resolved.service.d/override.conf
|
||||||
|
|
||||||
unpriv curl -s --proxy http://127.0.0.1:8082 https://raw.githubusercontent.com/TommyTran732/QubesOS-Scripts/main/etc/systemd/system/dnat-to-ns.service | sudo tee /etc/systemd/system/dnat-to-ns.service > /dev/null
|
download https://raw.githubusercontent.com/TommyTran732/QubesOS-Scripts/main/etc/systemd/system/dnat-to-ns.service /etc/systemd/system/dnat-to-ns.service
|
||||||
unpriv curl -s --proxy http://127.0.0.1:8082 https://raw.githubusercontent.com/TommyTran732/QubesOS-Scripts/main/etc/systemd/system/dnat-to-ns.path | sudo tee /etc/systemd/system/dnat-to-ns.path > /dev/null
|
download https://raw.githubusercontent.com/TommyTran732/QubesOS-Scripts/main/etc/systemd/system/dnat-to-ns.path /etc/systemd/system/dnat-to-ns.path
|
||||||
|
|
||||||
sudo systemctl enable dnat-to-ns.path
|
sudo systemctl enable dnat-to-ns.path
|
||||||
|
|
||||||
|
@ -14,6 +14,14 @@
|
|||||||
# 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
|
set -eu -o pipefail
|
||||||
|
|
||||||
|
unpriv(){
|
||||||
|
sudo -u nobody "${@}"
|
||||||
|
}
|
||||||
|
|
||||||
|
download() {
|
||||||
|
unpriv curl -s --proxy http://127.0.0.1:8082 "${1}" | sudo tee "${2}" > /dev/null
|
||||||
|
}
|
||||||
|
|
||||||
sudo dnf install -y android-tools mediawriter gnome-disk-utility
|
sudo dnf install -y android-tools mediawriter gnome-disk-utility
|
||||||
|
@ -20,7 +20,7 @@ unpriv(){
|
|||||||
sudo -u nobody "${@}"
|
sudo -u nobody "${@}"
|
||||||
}
|
}
|
||||||
|
|
||||||
dl() {
|
download() {
|
||||||
unpriv curl -s --proxy http://127.0.0.1:8082 "${1}" | sudo tee "${2}" > /dev/null
|
unpriv curl -s --proxy http://127.0.0.1:8082 "${1}" | sudo tee "${2}" > /dev/null
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -42,13 +42,13 @@ systemctl disable --now systemd-timesyncd
|
|||||||
systemctl mask systemd-timesyncd
|
systemctl mask systemd-timesyncd
|
||||||
|
|
||||||
# Harden SSH
|
# Harden SSH
|
||||||
dl https://raw.githubusercontent.com/TommyTran732/Linux-Setup-Scripts/main/etc/ssh/ssh_config.d/10-custom.conf /etc/ssh/ssh_config.d/10-custom.conf
|
download https://raw.githubusercontent.com/TommyTran732/Linux-Setup-Scripts/main/etc/ssh/ssh_config.d/10-custom.conf /etc/ssh/ssh_config.d/10-custom.conf
|
||||||
chmod 644 /etc/ssh/ssh_config.d/10-custom.conf
|
chmod 644 /etc/ssh/ssh_config.d/10-custom.conf
|
||||||
|
|
||||||
# Security kernel settings
|
# Security kernel settings
|
||||||
dl https://raw.githubusercontent.com/secureblue/secureblue/live/files/system/usr/etc/modprobe.d/blacklist.conf /etc/modprobe.d/workstation-blacklist.conf
|
download https://raw.githubusercontent.com/secureblue/secureblue/live/files/system/usr/etc/modprobe.d/blacklist.conf /etc/modprobe.d/workstation-blacklist.conf
|
||||||
sudo chmod 644 /etc/modprobe.d/workstation-blacklist.conf
|
sudo chmod 644 /etc/modprobe.d/workstation-blacklist.conf
|
||||||
dl https://raw.githubusercontent.com/TommyTran732/Linux-Setup-Scripts/main/etc/sysctl.d/99-workstation.conf /etc/sysctl.d/99-workstation.conf
|
download https://raw.githubusercontent.com/TommyTran732/Linux-Setup-Scripts/main/etc/sysctl.d/99-workstation.conf /etc/sysctl.d/99-workstation.conf
|
||||||
# This doesn't exist (jackwagon)
|
# This doesn't exist (jackwagon)
|
||||||
# sudo chmod 644 /etc/sysctl.d/30_security-misc_kexec-disable.conf
|
# sudo chmod 644 /etc/sysctl.d/30_security-misc_kexec-disable.conf
|
||||||
# Dracut doesn't seem to work - need to investigate
|
# Dracut doesn't seem to work - need to investigate
|
||||||
@ -56,7 +56,7 @@ dl https://raw.githubusercontent.com/TommyTran732/Linux-Setup-Scripts/main/etc/s
|
|||||||
sudo sysctl -p
|
sudo sysctl -p
|
||||||
|
|
||||||
# Setup ZRAM
|
# Setup ZRAM
|
||||||
dl https://raw.githubusercontent.com/TommyTran732/Linux-Setup-Scripts/main/etc/systemd/zram-generator.conf /etc/systemd/zram-generator.conf
|
download https://raw.githubusercontent.com/TommyTran732/Linux-Setup-Scripts/main/etc/systemd/zram-generator.conf /etc/systemd/zram-generator.conf
|
||||||
|
|
||||||
# Setup hardened_malloc
|
# Setup hardened_malloc
|
||||||
sudo https_proxy=https://127.0.0.1:8082 dnf copr enable secureblue/hardened_malloc -y
|
sudo https_proxy=https://127.0.0.1:8082 dnf copr enable secureblue/hardened_malloc -y
|
||||||
|
@ -14,29 +14,37 @@
|
|||||||
# 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
|
set -eu -o pipefail
|
||||||
|
|
||||||
|
unpriv(){
|
||||||
|
sudo -u nobody "${@}"
|
||||||
|
}
|
||||||
|
|
||||||
|
download() {
|
||||||
|
unpriv curl -s --proxy http://127.0.0.1:8082 "${1}" | sudo tee "${2}" > /dev/null
|
||||||
|
}
|
||||||
|
|
||||||
# Install necessary packages
|
# Install necessary packages
|
||||||
dnf install -y @hardware-support arc-theme chrony gnome-keyring NetworkManager-wifi network-manager-applet qubes-core-agent-networking qubes-core-agent-network-manager xfce4-notifyd
|
dnf install -y @hardware-support arc-theme chrony gnome-keyring NetworkManager-wifi network-manager-applet qubes-core-agent-networking qubes-core-agent-network-manager xfce4-notifyd
|
||||||
|
|
||||||
# Setup NTS
|
# Setup NTS
|
||||||
sudo rm -rf /etc/chrony.conf
|
sudo rm -rf /etc/chrony.conf
|
||||||
unpriv curl -s --proxy http://127.0.0.1:8082 https://raw.githubusercontent.com/GrapheneOS/infrastructure/main/chrony.conf | tee /etc/chrony.conf > /dev/null
|
download https://raw.githubusercontent.com/GrapheneOS/infrastructure/main/chrony.conf /etc/chrony.conf
|
||||||
unpriv curl --proxy http://127.0.0.1:8082 https://raw.githubusercontent.com/TommyTran732/Linux-Setup-Scripts/main/etc/sysconfig/chronyd | tee /etc/sysconfig/chronyd > /dev/null
|
download https://raw.githubusercontent.com/TommyTran732/Linux-Setup-Scripts/main/etc/sysconfig/chronyd /etc/sysconfig/chronyd
|
||||||
|
|
||||||
# Theming
|
# Theming
|
||||||
sudo mkdir -p /etc/gtk-3.0
|
sudo mkdir -p /etc/gtk-3.0
|
||||||
unpriv curl -s --proxy http://127.0.0.1:8082 https://raw.githubusercontent.com/TommyTran732/QubesOS-Scripts/main/etc/gtk-3.0/settings.ini | tee /etc/gtk-3.0/settings.ini > /dev/null
|
download https://raw.githubusercontent.com/TommyTran732/QubesOS-Scripts/main/etc/gtk-3.0/settings.ini /etc/gtk-3.0/settings.ini
|
||||||
|
|
||||||
sudo mkdir -p /etc/gtk-4.0
|
sudo mkdir -p /etc/gtk-4.0
|
||||||
unpriv curl -s --proxy http://127.0.0.1:8082 https://raw.githubusercontent.com/TommyTran732/QubesOS-Scripts/main/etc/gtk-4.0/settings.ini | tee /etc/gtk-4.0/settings.ini > /dev/null
|
download https://raw.githubusercontent.com/TommyTran732/QubesOS-Scripts/main/etc/gtk-4.0/settings.ini /etc/gtk-4.0/settings.ini
|
||||||
|
|
||||||
# Networking
|
# Networking
|
||||||
unpriv curl -s --proxy http://127.0.0.1:8082 https://raw.githubusercontent.com/TommyTran732/Linux-Setup-Scripts/main/etc/NetworkManager/conf.d/00-macrandomize.conf | tee /etc/NetworkManager/conf.d/00-macrandomize.conf > /dev/null
|
download https://raw.githubusercontent.com/TommyTran732/Linux-Setup-Scripts/main/etc/NetworkManager/conf.d/00-macrandomize.conf /etc/NetworkManager/conf.d/00-macrandomize.conf
|
||||||
unpriv curl -s --proxy http://127.0.0.1:8082 https://raw.githubusercontent.com/TommyTran732/Linux-Setup-Scripts/main/etc/NetworkManager/conf.d/01-transient-hostname.conf | tee /etc/NetworkManager/conf.d/01-transient-hostname.conf > /dev/null
|
download https://raw.githubusercontent.com/TommyTran732/Linux-Setup-Scripts/main/etc/NetworkManager/conf.d/01-transient-hostname.conf /etc/NetworkManager/conf.d/01-transient-hostname.conf
|
||||||
sudo hostnamectl hostname 'localhost'
|
sudo hostnamectl hostname 'localhost'
|
||||||
sudo hostnamectl --transient hostname ''
|
sudo hostnamectl --transient hostname ''
|
||||||
|
|
||||||
# This breaks saving network settings with the Fedora 40 template rn, so I am commenting it out.
|
# This breaks saving network settings with the Fedora 40 template rn, so I am commenting it out.
|
||||||
#sudo mkdir -p /etc/systemd/system/NetworkManager.service.d
|
#sudo mkdir -p /etc/systemd/system/NetworkManager.service.d
|
||||||
#curl -s --proxy http://127.0.0.1:8082 https://gitlab.com/divested/brace/-/raw/master/brace/usr/lib/systemd/system/NetworkManager.service.d/99-brace.conf | tee /etc/systemd/system/NetworkManager.service.d/99-brace.conf > /dev/null
|
#download https://gitlab.com/divested/brace/-/raw/master/brace/usr/lib/systemd/system/NetworkManager.service.d/99-brace.conf /etc/systemd/system/NetworkManager.service.d/99-brace.conf
|
||||||
|
@ -14,10 +14,14 @@
|
|||||||
# 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
|
set -eu -o pipefail
|
||||||
|
|
||||||
unpriv(){
|
unpriv(){
|
||||||
sudo -u nobody "$@"
|
sudo -u nobody "${@}"
|
||||||
|
}
|
||||||
|
|
||||||
|
download() {
|
||||||
|
unpriv curl -s --proxy http://127.0.0.1:8082 "${1}" | sudo tee "${2}" > /dev/null
|
||||||
}
|
}
|
||||||
|
|
||||||
# Setting umask to 077
|
# Setting umask to 077
|
||||||
@ -31,7 +35,7 @@ sudo sed -i 's/umask 022/umask 077/g' /etc/bashrc
|
|||||||
sudo chmod 700 /home/*
|
sudo chmod 700 /home/*
|
||||||
|
|
||||||
# Avoid phased updates
|
# Avoid phased updates
|
||||||
unpriv curl -s --proxy http://127.0.0.1:8082 https://raw.githubusercontent.com/TommyTran732/Linux-Setup-Scripts/main/etc/apt/apt.conf.d/99sane-upgrades | sudo tee /etc/apt/apt.conf.d/99sane-upgrades > /dev/null
|
download https://raw.githubusercontent.com/TommyTran732/Linux-Setup-Scripts/main/etc/apt/apt.conf.d/99sane-upgrades /etc/apt/apt.conf.d/99sane-upgrades > /dev/null
|
||||||
sudo chmod 644 /etc/apt/apt.conf.d/99sane-upgrades
|
sudo chmod 644 /etc/apt/apt.conf.d/99sane-upgrades
|
||||||
|
|
||||||
# Install packages
|
# Install packages
|
||||||
@ -48,10 +52,10 @@ sudo systemctl enable --now hide-hardware-info.service
|
|||||||
echo 'ConnectionPadding 1' | sudo tee /usr/local/etc/torrc.d/50_user.conf
|
echo 'ConnectionPadding 1' | sudo tee /usr/local/etc/torrc.d/50_user.conf
|
||||||
|
|
||||||
# Theming
|
# Theming
|
||||||
unpriv curl -s --proxy http://127.0.0.1:8082 https://raw.githubusercontent.com/TommyTran732/QubesOS-Scripts/main/etc/environment | sudo tee /etc/environment > /dev/null
|
download https://raw.githubusercontent.com/TommyTran732/QubesOS-Scripts/main/etc/environment /etc/environment
|
||||||
|
|
||||||
sudo mkdir -p /etc/gtk-3.0
|
sudo mkdir -p /etc/gtk-3.0
|
||||||
unpriv curl -s --proxy http://127.0.0.1:8082 https://raw.githubusercontent.com/TommyTran732/QubesOS-Scripts/main/etc/gtk-3.0/settings.ini | sudo tee /etc/gtk-3.0/settings.ini > /dev/null
|
download https://raw.githubusercontent.com/TommyTran732/QubesOS-Scripts/main/etc/gtk-3.0/settings.ini /etc/gtk-3.0/settings.ini
|
||||||
|
|
||||||
sudo mkdir -p /etc/gtk-4.0
|
sudo mkdir -p /etc/gtk-4.0
|
||||||
unpriv curl -s --proxy http://127.0.0.1:8082 https://raw.githubusercontent.com/TommyTran732/QubesOS-Scripts/main/etc/gtk-4.0/settings.ini | sudo tee /etc/gtk-4.0/settings.ini > /dev/null
|
download https://raw.githubusercontent.com/TommyTran732/QubesOS-Scripts/main/etc/gtk-4.0/settings.ini /etc/gtk-4.0/settings.ini
|
||||||
|
@ -14,10 +14,14 @@
|
|||||||
# 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
|
set -eu -o pipefail
|
||||||
|
|
||||||
unpriv(){
|
unpriv(){
|
||||||
sudo -u nobody "$@"
|
sudo -u nobody "${@}"
|
||||||
|
}
|
||||||
|
|
||||||
|
download() {
|
||||||
|
unpriv curl -s --proxy http://127.0.0.1:8082 "${1}" | sudo tee "${2}" > /dev/null
|
||||||
}
|
}
|
||||||
|
|
||||||
# Setting umask to 077
|
# Setting umask to 077
|
||||||
@ -31,7 +35,7 @@ sudo sed -i 's/umask 022/umask 077/g' /etc/bashrc
|
|||||||
sudo chmod 700 /home/*
|
sudo chmod 700 /home/*
|
||||||
|
|
||||||
# Avoid phased updates
|
# Avoid phased updates
|
||||||
unpriv curl -s --proxy http://127.0.0.1:8082 https://raw.githubusercontent.com/TommyTran732/Linux-Setup-Scripts/main/etc/apt/apt.conf.d/99sane-upgrades | sudo tee /etc/apt/apt.conf.d/99sane-upgrades > /dev/null
|
download https://raw.githubusercontent.com/TommyTran732/Linux-Setup-Scripts/main/etc/apt/apt.conf.d/99sane-upgrades /etc/apt/apt.conf.d/99sane-upgrades
|
||||||
sudo chmod 644 /etc/apt/apt.conf.d/99sane-upgrades
|
sudo chmod 644 /etc/apt/apt.conf.d/99sane-upgrades
|
||||||
|
|
||||||
# Install packages
|
# Install packages
|
||||||
@ -45,14 +49,14 @@ sudo systemctl enable --now proc-hidepid.service
|
|||||||
sudo systemctl enable --now hide-hardware-info.service
|
sudo systemctl enable --now hide-hardware-info.service
|
||||||
|
|
||||||
# Flatpak update service
|
# Flatpak update service
|
||||||
unpriv curl -s --proxy http://127.0.0.1:8082 https://raw.githubusercontent.com/TommyTran732/QubesOS-Scripts/main/etc/systemd/user/update-user-flatpaks.service | sudo tee /etc/systemd/user/update-user-flatpaks.service > /dev/null
|
download https://raw.githubusercontent.com/TommyTran732/QubesOS-Scripts/main/etc/systemd/user/update-user-flatpaks.service /etc/systemd/user/update-user-flatpaks.service
|
||||||
unpriv curl -s --proxy http://127.0.0.1:8082 https://raw.githubusercontent.com/TommyTran732/QubesOS-Scripts/main/etc/systemd/user/update-user-flatpaks.timer | sudo tee /etc/systemd/user/update-user-flatpaks.timer > /dev/null
|
download https://raw.githubusercontent.com/TommyTran732/QubesOS-Scripts/main/etc/systemd/user/update-user-flatpaks.timer /etc/systemd/user/update-user-flatpaks.timer
|
||||||
|
|
||||||
# Theming
|
# Theming
|
||||||
unpriv curl -s --proxy http://127.0.0.1:8082 https://raw.githubusercontent.com/TommyTran732/QubesOS-Scripts/main/etc/environment | sudo tee /etc/environment > /dev/null
|
download https://raw.githubusercontent.com/TommyTran732/QubesOS-Scripts/main/etc/environment /etc/environment
|
||||||
|
|
||||||
sudo mkdir -p /etc/gtk-3.0
|
sudo mkdir -p /etc/gtk-3.0
|
||||||
unpriv curl -s --proxy http://127.0.0.1:8082 https://raw.githubusercontent.com/TommyTran732/QubesOS-Scripts/main/etc/gtk-3.0/settings.ini | sudo tee /etc/gtk-3.0/settings.ini > /dev/null
|
download https://raw.githubusercontent.com/TommyTran732/QubesOS-Scripts/main/etc/gtk-3.0/settings.ini /etc/gtk-3.0/settings.ini
|
||||||
|
|
||||||
sudo mkdir -p /etc/gtk-4.0
|
sudo mkdir -p /etc/gtk-4.0
|
||||||
unpriv curl -s --proxy http://127.0.0.1:8082 https://raw.githubusercontent.com/TommyTran732/QubesOS-Scripts/main/etc/gtk-4.0/settings.ini | sudo tee /etc/gtk-4.0/settings.ini > /dev/null
|
download https://raw.githubusercontent.com/TommyTran732/QubesOS-Scripts/main/etc/gtk-4.0/settings.ini /etc/gtk-4.0/settings.ini
|
Loading…
Reference in New Issue
Block a user