Skip to content

Commit

Permalink
Remove firejail
Browse files Browse the repository at this point in the history
  • Loading branch information
leomeinel committed Apr 14, 2024
1 parent 8466fe1 commit 2c8ebda
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 46 deletions.
14 changes: 0 additions & 14 deletions etc/pacman.d/hooks/70-firejail.hook

This file was deleted.

1 change: 0 additions & 1 deletion pkgs-setup.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ fd
ffmpeg
filezilla
firefox
firejail
flatpak
fwupd
gimp
Expand Down
22 changes: 1 addition & 21 deletions post-gui.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# File: post-gui.sh
# Author: Leopold Meinel (leo@meinel.dev)
# -----
# Copyright (c) 2023 Leopold Meinel & contributors
# Copyright (c) 2024 Leopold Meinel & contributors
# SPDX ID: GPL-3.0-or-later
# URL: https://www.gnu.org/licenses/gpl-3.0-standalone.html
# -----
Expand All @@ -16,32 +16,12 @@ source "$SCRIPT_DIR/install.conf"
# Fail on error
set -e

# Clean firecfg
doas firecfg --clean

# Configure dot-files (vscodium)
~/dot-files/exts-code.sh
doas su -lc '~/dot-files/exts-code.sh' "$VIRTUSER"
doas su -lc '~/dot-files/exts-code.sh' "$HOMEUSER"
doas su -lc '~/dot-files/exts-code.sh' "$GUESTUSER"

# Configure firejail
## START sed
FILE=/etc/firejail/firecfg.config
STRINGS=("code-oss" "code" "codium" "dnsmasq" "lollypop" "nextcloud-desktop" "nextcloud" "shotwell" "signal-desktop" "transmission-cli" "transmission-create" "transmission-daemon" "transmission-edit" "transmission-gtk" "transmission-remote" "transmission-show" "vscodium")
for string in "${STRINGS[@]}"; do
grep -q "$string" "$FILE" || sed_exit
doas sed -i "s/^$string$/#$string #arch-install/" "$FILE"
done
## END sed
doas firecfg --add-users root "$SYSUSER" "$VIRTUSER" "$HOMEUSER" "$GUESTUSER"
doas apparmor_parser -r /etc/apparmor.d/firejail-default
doas firecfg
rm -rf ~/.local/share/applications/*
doas su -c 'rm -rf ~/.local/share/applications/*' "$VIRTUSER"
doas su -c 'rm -rf ~/.local/share/applications/*' "$HOMEUSER"
doas su -c 'rm -rf ~/.local/share/applications/*' "$GUESTUSER"

# Remove scripts
rm -f ~/.bash_history
rm -f "$SCRIPT_DIR/install.conf"
Expand Down
11 changes: 1 addition & 10 deletions setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -91,15 +91,6 @@ chmod 0400 /etc/doas.conf
## Configure random MAC address for WiFi in /etc/NetworkManager/conf.d/50-mac-random.conf
chmod 644 /etc/NetworkManager/conf.d/50-mac-random.conf
## Configure pacman hooks in /etc/pacman.d/hooks
{
echo '#!/usr/bin/env sh'
echo ''
echo '/usr/bin/firecfg >/dev/null 2>&1'
echo "/usr/bin/su -c '/usr/bin/rm -rf ~/.local/share/applications/*' $SYSUSER"
echo "/usr/bin/su -c '/usr/bin/rm -rf ~/.local/share/applications/*' $VIRTUSER"
echo "/usr/bin/su -c '/usr/bin/rm -rf ~/.local/share/applications/*' $HOMEUSER"
echo "/usr/bin/su -c '/usr/bin/rm -rf ~/.local/share/applications/*' $GUESTUSER"
} >/etc/pacman.d/hooks/scripts/70-firejail.sh
DISK1="$(lsblk -npo PKNAME "$(findmnt -no SOURCE --target /efi)" | tr -d "[:space:]")"
DISK1P2="$(lsblk -rnpo TYPE,NAME "$DISK1" | grep "part" | sed 's/part//' | sed -n '2p' | tr -d "[:space:]")"
lsblk -rno TYPE "$DISK1P2" | grep -q "raid1" &&
Expand Down Expand Up @@ -181,7 +172,7 @@ pacman -Syu --noprogressbar --noconfirm --needed - <"$SCRIPT_DIR/pkgs-setup.txt"
## Install optional dependencies
DEPENDENCIES=""
pacman -Qq "apparmor" >/dev/null 2>&1 &&
DEPENDENCIES+=$'\npython-notify2'
DEPENDENCIES+=$'\npython-notify2\npython-psutil'
pacman -Qq "docker" >/dev/null 2>&1 &&
DEPENDENCIES+=$'\ndocker-scan'
pacman -Qq "libvirt" >/dev/null 2>&1 &&
Expand Down

0 comments on commit 2c8ebda

Please sign in to comment.