diff --git a/.installer/packages b/.installer/packages index 41c8962..6fd3725 100644 --- a/.installer/packages +++ b/.installer/packages @@ -1,5 +1,5 @@ pacman-any:feh,i3exit,i3status,network-manager-applet,pasystray,xautolock,inotify-tools,xss-lock,noto-fonts-emoji pacman-any:gst-libav,phonon-qt5-gstreamer,gst-plugins-good,qt5-quickcontrols,qt5-graphicaleffects,qt5-multimedia -pacman-any:code,vim +pacman-any:code,vim,ufw pacman-laptop:brightnessctl aur-any:picom-git,flashfocus-git,sddm-theme-aerial-git diff --git a/setup_system.sh b/setup_system.sh index 7089d2a..149a891 100755 --- a/setup_system.sh +++ b/setup_system.sh @@ -58,31 +58,6 @@ function get_packages() { done } -function configure_sddm() { - local sddm_config_dir="/etc/sddm.conf.d" - local theme_dir="/usr/share/sddm/themes/aerial" - - echo "Setting up '$sddm_config_dir'." - - if ! [ -d "$sddm_config_dir" ]; then - sudo mkdir "$sddm_config_dir" - sudo chown root:root -R "$sddm_config_dir" - fi - - { - echo "[Theme]" - echo "Current=aerial" - } | sudo tee "$sddm_config_dir/theme" >/dev/null - - { - echo "[X11]" - echo "DisplayCommand=/usr/share/sddm/scripts/Xsetup" - } | sudo tee "$sddm_config_dir/xsetup" >/dev/null - - echo "Setting up '$theme_dir'." - sudo mv "$theme_dir/theme.conf.user" "$theme_dir/theme.conf.user.disabled" -} - function prepare_arch() { which pamac >/dev/null && return 0 sudo pacman -S pamac --noconfirm || return 1 @@ -117,11 +92,47 @@ function setup_arch_with_yay() { done } +function configure_sddm() { + local sddm_config_dir="/etc/sddm.conf.d" + local theme_dir="/usr/share/sddm/themes/aerial" + local theme_user_config="$theme_dir/theme.conf.user" + + echo "Setting up '$sddm_config_dir'." + + if ! [ -d "$sddm_config_dir" ]; then + sudo mkdir "$sddm_config_dir" + sudo chown root:root -R "$sddm_config_dir" + fi + + { + echo "[Theme]" + echo "Current=aerial" + } | sudo tee "$sddm_config_dir/theme" >/dev/null + + { + echo "[X11]" + echo "DisplayCommand=/usr/share/sddm/scripts/Xsetup" + } | sudo tee "$sddm_config_dir/xsetup" >/dev/null + + echo "Setting up '$theme_dir'." + [ -f "$theme_user_config" ] && sudo mv "$theme_user_config" "$theme_user_config.disabled" +} + +function configure_ufw() { + echo "Setting up UFW." + + sudo systemctl enable ufw.service || return 1 + sudo systemctl start ufw.service || return 2 + sudo ufw enable || return 3 + sudo ufw allow ssh || return 4 +} + function setup_arch() { prepare_arch || return 1 setup_arch_with_pamac || return 2 setup_arch_with_yay || return 3 configure_sddm || return 4 + configure_ufw || return 5 } ID_LIKE="$(grep ID_LIKE=