1
0
mirror of https://github.com/tommytran732/Linux-Setup-Scripts synced 2024-09-18 13:14:43 -04:00

Compare commits

...

9 Commits

Author SHA1 Message Date
f8705da2e4
Stup ZRAM on Fedora 2023-09-26 16:08:48 -07:00
7add135aea
Remove Flat Remix
Signed-off-by: Tommy <contact@tommytran.io>
2023-09-26 16:02:25 -07:00
c338042055
Typo Fix
Signed-off-by: Tommy <contact@tommytran.io>
2023-09-26 15:59:30 -07:00
b93eba253a
Update dnf config 2023-09-26 15:43:53 -07:00
002eeae36f
Fix Networking (Again)
Signed-off-by: Tommy <contact@tommytran.io>
2023-09-26 15:39:01 -07:00
d6f6b008d6
Don't mess with hostname
Signed-off-by: Tommy <contact@tommytran.io>
2023-09-26 15:34:03 -07:00
f49621029c
Fix Fedora Workstation Networking
Signed-off-by: Tommy <contact@tommytran.io>
2023-09-26 15:32:17 -07:00
e4f8c7a167
Remove tuned
Signed-off-by: Tommy <contact@tommytran.io>
2023-09-26 15:25:50 -07:00
c5cbbc6c7a
Use firewalld block zone on Fedora Workstation
Signed-off-by: Tommy <contact@tommytran.io>
2023-09-26 15:20:38 -07:00
2 changed files with 20 additions and 32 deletions

View File

@ -33,13 +33,16 @@ OPTIONS="-F 1"' | sudo tee /etc/sysconfig/chronyd
sudo systemctl restart chronyd
# Setup Firewalld
sudo firewall-cmd --permanent --remove-port=1025-65535/udp
sudo firewall-cmd --permanent --remove-port=1025-65535/tcp
sudo firewall-cmd --permanent --remove-service=mdns
sudo firewall-cmd --permanent --remove-service=ssh
sudo firewall-cmd --permanent --remove-service=samba-client
# Setup Networking
echo -e '[device]\nwifi.scan-rand-mac-address=yes\n\n[connection]\nwifi.cloned-mac-address=random\nethernet.cloned-mac-address=random' | sudo tee /etc/NetworkManager/conf.d/99-random-mac.conf
echo -e '[main]\nhostname-mode=none' | sudo tee /etc/NetworkManager/conf.d/01-transient-hostname.conf
sudo nmcli general reload conf
sudo hostnamectl hostname 'localhost'
sudo hostnamectl --transient hostname ''
sudo firewall-cmd --set-default-zone=block
sudo firewall-cmd --permanent --add-service=dhcpv6-client
sudo firewall-cmd --reload
sudo firewall-cmd --lockdown-on
# Harden SSH
echo "GSSAPIAuthentication no" | sudo tee /etc/ssh/ssh_config.d/10-custom.conf
@ -72,9 +75,12 @@ org/gnome/desktop/media-handling/automount-open' | sudo tee /etc/dconf/db/local.
sudo dconf update
# Setup ZRAM
echo -e '[zram0]\nzram-size = min(ram, 8192)\ncompression-algorithm = zstd' | sudo tee /etc/systemd/zram-generator.conf
# Speed up DNF
echo 'fastestmirror=1' | sudo tee -a /etc/dnf/dnf.conf
echo 'countme=false' | sudo tee -a /etc/dnf/dnf.conf
echo -e 'fastestmirror=1\nmax_parallel_downloads=10\ndeltarpm=False\ndefaultyes=True\ninstall_weak_deps=False\ncountme=False' | sudo tee -a /etc/dnf/dnf.conf
sudo sed -i 's/^metalink=.*/&\&protocol=https/g' /etc/yum.repos.d/*
# Update packages and firmware
sudo dnf upgrade -y
@ -108,13 +114,10 @@ sudo dnf -y remove fedora-bookmarks fedora-chromium-config firefox mozilla-files
lvm2 rng-tools thermald *perl* yajl
# Disable openh264 repo
sudo dnf config-manager --set-disabled fedora-cisco-openh264 -y
sudo dnf config-manager --set-disabled fedora-cisco-openh264
# Install packages that I use
sudo dnf -y install gnome-console git-core flat-remix-theme gnome-shell-extension-appindicator gnome-shell-extension-blur-my-shell gnome-shell-extension-background-logo gnome-shell-extension-dash-to-dock gnome-shell-extension-no-overview tuned
# Setup tuned
sudo tuned-adm profile latency-performance
sudo dnf -y install gnome-console git-core gnome-shell-extension-appindicator gnome-shell-extension-blur-my-shell gnome-shell-extension-background-logo gnome-shell-extension-dash-to-dock gnome-shell-extension-no-overview
# Enable auto TRIM
sudo systemctl enable fstrim.timer
@ -131,23 +134,4 @@ sudo echo "UUID=${PARTITIONUUID} /btrfs_pool btrfs subvolid=5,ssd,
sudo grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg
sudo dnf -y install timeshift
# andomize MAC address
sudo bash -c 'cat > /etc/NetworkManager/conf.d/00-macrandomize.conf' <<-'EOF'
[device]
wifi.scan-rand-mac-address=yes
[connection]
wifi.cloned-mac-address=random
ethernet.cloned-mac-address=random
EOF
# Disable transient hostname
sudo bash -c 'cat > /etc/NetworkManager/conf.d/00-macrandomize.conf' <<-'EOF'
[main]
hostname-mode=none
EOF
sudo systemctl restart NetworkManager
sudo hostnamectl hostname "localhost"
## The script is done. You can also remove gnome-terminal since gnome-console will replace it.

View File

@ -57,6 +57,10 @@ sudo curl https://gitlab.com/divested/brace/-/raw/master/brace/usr/lib/systemd/s
sudo systemctl daemon-reload
sudo systemctl restart irqbalance
# Setup dnf
echo -e 'fastestmirror=1\nmax_parallel_downloads=10\ndeltarpm=False\ndefaultyes=True\ninstall_weak_deps=False\ncountme=False' | sudo tee -a /etc/dnf/dnf.conf
sudo sed -i 's/^metalink=.*/&\&protocol=https/g' /etc/yum.repos.d/*
# Setup unbound
sudo dnf install unbound -y