SpectreOS/arch-graphical-install-auto.sh

753 lines
21 KiB
Bash
Raw Normal View History

2022-10-04 19:01:31 +02:00
#!/usr/bin/env bash
#
set -ex
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root" 1>&2
sudo "$@"
exit 0
fi
echo "Als root Angemeldet"
RCLOCAL='/etc/rc.local'
RCLOCALSHUTDOWN='/etc/rc.local.shutdown'
SYSCTL='/etc/sysctl.conf'
SUDOERS="/etc/sudoers"
autostartdesktop=sway
2022-12-31 00:37:25 +01:00
repo=SpectreOS
2022-10-04 19:01:31 +02:00
repo1=shell-scripte-code
2023-06-02 10:47:54 +02:00
hostname=$(cat /etc/hostname)
2022-10-04 19:01:31 +02:00
user=user1
userpass=user1
arch=$(uname -m)
2022-10-04 19:33:32 +02:00
branch=master
2022-10-04 19:01:31 +02:00
offline=false
# Lese die Umgebungsvariablen neu
source /etc/environment
# while-schleife
while (( "$#" ))
do
echo ${1}
export ${1}="y"
shift
done
if cat /etc/passwd | grep "x:1000" > /dev/null; then
tempuser=$(cat /etc/passwd | grep "x:1000" | awk '{print $1}')
2022-10-04 19:01:31 +02:00
user=${tempuser%%:*}
2023-04-06 14:43:46 +02:00
#else
# user=$(whoami)
2022-10-04 19:01:31 +02:00
fi
function pacmanconf() {
cp -v /opt/${repo}/mirrorlist* /etc/pacman.d/
cp -v /opt/${repo}/pacman.conf /etc/pacman.conf
pacman-key --init
pacman-key --populate archlinux
2023-03-07 12:55:35 +01:00
pacman -Syu git glibc --needed --noconfirm
2022-10-04 19:01:31 +02:00
}
function gitclone() {
git config --global credential.helper store
git config --global core.editor "vim"
2023-05-25 12:50:18 +02:00
git config --global user.email "user@example.org"
git config --global user.name "user"
2022-10-04 19:01:31 +02:00
git config --global push.default simple
git config --global pull.rebase true
2023-07-04 17:44:16 +02:00
git config --global merge.tool vimdiff
2022-10-04 19:01:31 +02:00
git config --global --add safe.directory '*'
# Aktualisiere die Repositiories
# Überprüfe ob das GIT Repo überhaupt vorhanden ist, sonst verwende das Failback
if [ -f "/opt/${repo}/repo.sh" ]; then /opt/${repo}/repo.sh; else /usr/bin/repo; fi
# Lese die Umgebungsvariablen neu
source /etc/environment
if [ "${offline}" != "true" ]; then
if [ -d "/opt/${repo}" ]; then
echo "${repo} existiert bereits!!!"
cd /opt/${repo}
2022-10-04 19:33:32 +02:00
git checkout ${branch}
2022-10-04 19:01:31 +02:00
if ! git remote set-url origin ${WEBADDRESS_OS}; then
git remote add origin ${WEBADDRESS_OS}
fi
git pull
else
2022-10-04 19:33:32 +02:00
git clone -b ${branch} ${WEBADDRESS_OS} /opt/${repo}
2022-10-04 19:01:31 +02:00
fi
if [ -d "/opt/${repo1}" ]; then
echo "${repo1} existiert bereits!!!"
cd /opt/${repo1}
if ! git remote set-url origin ${WEBADDRESS_SCRIPTE}; then
git remote add origin ${WEBADDRESS_SCRIPTE}
fi
git pull
else
git clone ${WEBADDRESS_SCRIPTE} /opt/${repo1}
fi
fi
cd /
}
function standartinstallation() {
if ! pacman -Syu $(cat /opt/${repo}/packages.txt) --needed --noconfirm; then
echo "Konnte Aktualisierung nicht abschließen!!!"
echo "Versuche die Packete automatisch zu aktualisieren!!!"
sleep 5
fi
}
function addusers() {
# Erstelle Gruppen
groupid=1000
2023-07-23 20:49:52 +02:00
for wort in ${user} users wheel audio input power storage video sys optical adm lp scanner sddm kvm fuse autologin network wireshark docker libvirt libvirtdbus flatpak seat nix-users; do
2022-10-04 19:01:31 +02:00
if ! cat /etc/group | grep ${wort}; then
while cat /etc/group | grep ${groupid}; do
groupid=$((${groupid} + 1))
done
groupadd ${wort} -g ${groupid}
fi
done
useruid=1000
2022-10-04 19:01:31 +02:00
while cat /etc/passwd | grep ${useruid}; do
useruid=$((${useruid} + 1))
done
2023-07-23 20:49:52 +02:00
useradd -m -g ${user} -G users,wheel,audio,input,power,storage,video,sys,optical,adm,lp,scanner,sddm,kvm,fuse,autologin,network,wireshark,docker,libvirt,libvirtdbus,flatpak,seat,nix-users -s /usr/bin/zsh --uid ${useruid} ${user}
2022-10-04 19:01:31 +02:00
echo "${user}:${userpass}" | chpasswd
mkdir -p /home/${user}/
userrechte
}
function add_plymouth() {
cd /opt/
if [ "${version%-*-*}" != "lite" ] && [ "${skip}" != "skip" ] && ! [ "${version#*-}" == "cli" ]; then
aurinstaller "https://aur.archlinux.org/plymouth.git"
aurinstaller "https://aur.archlinux.org/plymouth-theme-dark-arch.git"
plymouth-set-default-theme -R dark-arch
fi
if ! [ -d plymouth-bgrt ]; then
if git clone https://github.com/darac/plymouth-bgrt.git; then
cd plymouth-bgrt
if ./install.sh; then
plymouth-set-default-theme -R plymouth-bgrt
else
echo "Konnte das Bootlogo nicht finden!!!"
fi
echo "Git erfolgreich runtergeladen ;-D"
else
echo "Konnte Git nicht herunterladen!!!"
fi
else
cd plymouth-bgrt
update_git
fi
cd /
}
function userrechte() {
#user
chown -cR "$user":"$user" /home/"$user"
#chmod 750 -R /home/"$user"
2022-10-04 19:01:31 +02:00
#ssh
if ! [ -d /home/"$user"/.ssh ]; then
mkdir -p /home/"$user"/.ssh
fi
chmod 700 /home/"$user"/.ssh
if [ -f /home/"$user"/.ssh/config ]; then
chmod 400 /home/${user}/.ssh/config
fi
if [ -f /home/"$user"/.ssh/id_rsa ]; then
chmod 600 /home/"$user"/.ssh/id_rsa
fi
if ! [ -f /home/"$user"/.ssh/authorized_keys ]; then
touch /home/"$user"/.ssh/authorized_keys
fi
chmod 600 /home/"$user"/.ssh/authorized_keys
#gnupg
mkdir -p /home/"$user"/.gnupg
chmod -R 700 /home/"$user"/.gnupg
chown -cRv "$user":"$user" /home/${user}/.gnupg
2022-10-04 19:01:31 +02:00
if [ -f /home/${user}/.gnupg/* ]; then
chmod -v 600 /home/${user}/.gnupg/*
fi
}
function links() {
#
mkdir -p /home/"$user"/Schreibtisch/
if [ -f "/usr/share/applications/arch-install.desktop" ]; then
if [ -f "/home/"$user"/Schreibtisch/arch-install.desktop" ]; then
echo "datei existiert bereits!"
else
ln -s /usr/share/applications/arch-install.desktop /home/"$user"/Schreibtisch/arch-install.desktop
fi
#chmod +x /home/"$user"/Schreibtisch/arch-install.desktop
fi
mkdir -p /home/"$user"/Desktop/
if [ -f "/usr/share/applications/arch-install.desktop" ]; then
if [ -f "/home/"$user"/Desktop/arch-install.desktop" ]; then
echo "datei existiert bereits!"
else
ln -s /usr/share/applications/arch-install.desktop /home/"$user"/Desktop/arch-install.desktop
fi
#chmod +x /home/"$user"/Desktop/arch-install.desktop
fi
}
function add_locale_settings() {
# set systemconfiguration
echo "LANG=de_DE.UTF-8" > /etc/locale.conf
echo "LC_COLLATE=C" >> /etc/locale.conf
echo "LANGUAGE=de_DE" >> /etc/locale.conf
echo "de_DE.UTF-8 UTF-8" > /etc/locale.gen
echo "de_DE ISO-8859-1" >> /etc/locale.gen
2023-07-19 14:46:12 +02:00
echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen
2022-10-04 19:01:31 +02:00
locale-gen
echo "KEYMAP=de" > /etc/vconsole.conf
echo "FONT=lat9w-16" >> /etc/vconsole.conf
if [ -f "/etc/conf.d/keymaps" ]; then
sed -i 's/keymap=.*$/keymap=\"de\"/' /etc/conf.d/keymaps
fi
sed -e 's|Option "XkbLayout".*$|Option "XkbLayout" "de"|' -i /etc/X11/xorg.conf.d/20-keyboard.conf
if [ "$keytable_short" != "de" ]; then
sed -e 's| xkb_layout.*$| xkb_layout de|' -i /home/${user}/.config/sway/config
fi
# https://stackoverflow.com/questions/5767062/how-to-check-if-a-symlink-exists
if [ -L /etc/localtime ]; then
rm /etc/localtime
fi
ln -s /usr/share/zoneinfo/Europe/Berlin /etc/localtime
}
function update_git() {
git reset --hard
if ! git pull; then
echo "Konnte die Git-Repository nicht aktualisieren!!!"
fi
}
# Lade wichtige Git-Repositorys herunter
gitclone
# Konfiguriere die Repositoryverwaltung Pacman
pacmanconf
if [ "$1" == "adduser" ]; then
user="$2"
userpass="$3"
if cat /etc/passwd | grep "x:1000" > /dev/null; then
2022-10-04 19:01:31 +02:00
echo "${user} existiert bereits!!!"
else
addusers
fi
exit 0
elif [ "$1" == "add_plymouth" ]; then
add_plymouth
exit 0
elif [ "$1" == "userrechte" ]; then
userrechte
exit 0
fi
if cat /etc/passwd | grep ${user} > /dev/null; then
echo "${user} existiert bereits!!!"
else
addusers
fi
if [ "$erstellen" == "exit" ]
then
exit 0
fi
# grundinstallation
echo "root:root" | chpasswd
# sudoers/wheel
echo "Lege $SUDOERS neu an!!!"
echo "root ALL=(ALL) NOPASSWD: ALL" > $SUDOERS
echo "%wheel ALL=(ALL) NOPASSWD: ALL" >> $SUDOERS
#echo "%master ALL=(ALL) NOPASSWD: ALL" >> $SUDOERS
# Setze die die UIDs und GIDs standartmässig auf 2000 bei der erstellung von neuen Benutzern und Gruppen
#sed -i 's/^UID_MIN.*$/UID_MIN 2000/' /etc/login.defs
#sed -i 's/^GID_MIN.*$/GID_MIN 2000/' /etc/login.defs
2022-10-04 19:01:31 +02:00
# systemaktualisierung
standartinstallation
echo "Packetliste2 Ende"
echo "Beginne mit dem Konfigurieren des Systems :D"
# import compress script
# compress-script
cp /opt/${repo}/scripts/compress.sh /usr/bin/compress
chmod 755 /usr/bin/compress
cp /opt/${repo}/scripts/compress-pigz.sh /usr/bin/compress-pigz
chmod 755 /usr/bin/compress-pigz
2022-10-08 12:44:12 +02:00
# pinentray wayland
cp /opt/${repo}/scripts/pinentry-wayland /usr/bin/pinentry-wayland
chmod 755 /usr/bin/pinentry-wayland
2022-10-04 19:01:31 +02:00
# set system startup files
echo "System startup files"
cp -v /opt/${repo}/service/* /etc/systemd/system/
systemctl enable acpid
systemctl enable ntpd
systemctl enable avahi-daemon
systemctl enable cups
systemctl enable sshd
systemctl disable systemd-random-seed.service
systemctl enable cronie
systemctl enable systemd-timesyncd.service
systemctl disable docker
systemctl disable x11vnc
#systemctl enable mpd
#systemctl enable syncthing@simono41.service
echo "Bitte OpenVPN config in die /etc/openvpn/client/client.conf kopieren!!!"
if [ -f /lib/systemd/system/openvpn-client@client.service ]; then
echo "link vorhanden!"
else
ln /lib/systemd/system/openvpn-client@.service /lib/systemd/system/openvpn-client@client.service
fi
#Bei ausdokumentierung wird eine/die VPN automatisch aus der /etc/openvpn/client/client.conf gestartet!!!
#systemctl enable openvpn-client@client.service
#systemctl enable wg-quick@peer1.service
systemctl enable fail2ban
systemctl enable NetworkManager.service
systemctl enable bluetooth.service
#systemctl enable httpd
#systemctl enable sddm
2023-06-06 09:52:29 +02:00
systemctl enable seatd
2023-06-12 16:07:35 +02:00
# https://wiki.archlinux.org/title/CPU_frequency_scaling
systemctl enable power-profiles-daemon
2023-07-23 20:49:52 +02:00
# systemctl enable nix-daemon.service
2022-10-04 19:01:31 +02:00
#add_plymouth
#mkdir -p /etc/systemd/system/getty\@tty1.service.d/
#echo "[Service]" > /etc/systemd/system/getty\@tty1.service.d/autologin.conf
#echo "ExecStart=" >> /etc/systemd/system/getty\@tty1.service.d/autologin.conf
#echo "ExecStart=-/usr/bin/agetty --autologin ${user} -s %I 115200,38400,9600 vt102" >> /etc/systemd/system/getty\@tty1.service.d/autologin.conf
# iso_name
echo "${hostname}" > /etc/hostname
echo "hostname=\"${hostname}\"" > /etc/conf.d/hostname
# uefi-boot
cp /opt/${repo1}/uefi-boot.sh /usr/bin/uefi-boot
chmod 755 /usr/bin/uefi-boot
# youtube
cp /opt/${repo1}/youtube.sh /usr/bin/youtube-downloader
chmod 755 /usr/bin/youtube-downloader
# write-partitions manager
cp /opt/${repo}/scripts/write_cowspace /usr/bin/write_cowspace
chmod 755 /usr/bin/write_cowspace
# installer-/usr/bin/
cp /opt/${repo}/arch-install.sh /usr/bin/arch-install
chmod 755 /usr/bin/arch-install
if ! grep 'TERMINAL' /etc/environment; then
2022-10-29 22:58:39 +02:00
echo "TERMINAL=wezterm" >> /etc/environment
2022-10-04 19:01:31 +02:00
fi
if ! grep 'EDITOR' /etc/environment; then
echo "EDITOR=vim" >> /etc/environment
fi
# /etc/arch-release
echo "OS=${repo}" > /etc/arch-release
# tablet-onboard
cp /opt/${repo}/scripts/tablet-onboard.sh /usr/bin/tablet-onboard
chmod +x /usr/bin/tablet-onboard
# bash.bashrc
sed "s|%OS_NAME%|${repo}|g;" /opt/${repo}/configs/bash.bashrc > /etc/bash.bashrc
cp /opt/${repo}/service/btrfs-swapon.service /etc/systemd/system/
# btrfs-swapfile
cp /opt/${repo}/scripts/btrfs-swapon /usr/bin/
chmod 755 /usr/bin/btrfs-swapon
cp /opt/${repo}/scripts/btrfs-swapoff /usr/bin/
chmod 755 /usr/bin/btrfs-swapoff
# ssh
cp /opt/${repo}/configs/sshd_config /etc/ssh/sshd_config
# snapshot.sh
cp /opt/${repo}/scripts/snapshot.sh /usr/bin/snapshot
chmod 755 /usr/bin/snapshot
# update-script
cp /opt/${repo}/scripts/update.sh /usr/bin/update-script
chmod 755 /usr/bin/update-script
# Verzeichnisse
mkdir -p /home/${user}/Dokumente
mkdir -p /home/${user}/Bilder
mkdir -p /home/${user}/Musik
mkdir -p /home/${user}/Downloads
mkdir -p /home/${user}/Videos
mkdir -p /home/${user}/Desktop
mkdir -p /home/${user}/Public
mkdir -p /home/${user}/Templates
# addusers.sh
cp /opt/${repo}/scripts/addusers.sh /usr/bin/addusers
chmod 755 /usr/bin/addusers
# set default shell
2023-01-23 23:12:30 +01:00
chsh -s /usr/bin/zsh root
chsh -s /usr/bin/zsh ${user}
2022-10-04 19:01:31 +02:00
# aurinstaller
cp /opt/${repo}/scripts/aurinstall.sh /usr/bin/aurinstaller
chmod +x /usr/bin/aurinstaller
cp /opt/${repo}/scripts/aurupdater.sh /usr/bin/aurupdater
chmod +x /usr/bin/aurupdater
# setcap-ping
setcap cap_net_raw+ep /bin/ping
# gpg pinentry
mkdir -p /home/${user}/.gnupg/
cp /opt/${repo}/scripts/pinentry-wayland /usr/bin/
# installer
mkdir -p /usr/share/applications/
cp /opt/${repo}/desktop/arch-install.desktop /usr/share/applications/arch-install.desktop
# install-picture
mkdir -p /usr/share/pixmaps/
cp /opt/${repo}/desktop/install.png /usr/share/pixmaps/
# grub_background
mkdir -p /usr/share/grub/
cp /opt/${repo}/grub/grub_background.png /usr/share/grub/background.png
# bluetooth-network-polkit
mkdir -p /etc/polkit-1/rules.d/
cp /opt/${repo}/polkit/51-blueman.rules /etc/polkit-1/rules.d/51-blueman.rules
cp /opt/${repo}/polkit/50-org.freedesktop.NetworkManager.rules /etc/polkit-1/rules.d/50-org.freedesktop.NetworkManager.rules
# os-release
cp /opt/${repo}/os-release /etc/
# lsb-release
2023-06-05 16:52:23 +02:00
#cp /opt/${repo}/lsb-release /etc/
2022-10-04 19:01:31 +02:00
# autodiskmount
mkdir -p /media/
mkdir -p /etc/udev/rules.d/
# touchpad
#cp /opt/${repo}/01-touchpad.rules /etc/udev/rules.d/01-touchpad.rules
cp /opt/${repo}/scripts/mouse-pnp-event-handler.sh /usr/bin/mouse-pnp-event-handler.sh
chmod +x /usr/bin/mouse-pnp-event-handler.sh
cp /opt/${repo}/scripts/touchpad_toggle.sh /usr/bin/touchpad_toggle
chmod +x /usr/bin/touchpad_toggle
# hardreset
cp /opt/${repo}/scripts/hardreset.sh /usr/bin/hardreset.sh
chmod +x /usr/bin/hardreset.sh
# slowtype
cp /opt/${repo}/scripts/slowtype /usr/bin/slowtype
chmod +x /usr/bin/slowtype
# clipboard wrapper
cp -v /opt/${repo}/scripts/clipboard_wrapper/* /usr/bin/
# Convert commands (vim)
cp -v /opt/${repo}/scripts/csv2tsv /usr/bin/
cp -v /opt/${repo}/scripts/tsv2csv /usr/bin/
# cpu_gpu sensors
mkdir -p /etc/conf.d
cp /opt/${repo}/scripts/lm_sensors /etc/conf.d/lm_sensors
# wacom stylus-support
cp /opt/${repo}/configs/10-wacom.rules /etc/udev/rules.d/10-wacom.rules
cp /usr/share/X11/xorg.conf.d/70-wacom.conf /etc/X11/xorg.conf.d/
# zramctrl
cp /opt/${repo}/scripts/zramctrl /usr/bin/zramctrl
cp /opt/${repo}/service/zramswap.service /etc/systemd/system/zramswap.service
systemctl enable zramswap
# hooks
cp -v /opt/${repo}/configs/install/* /usr/lib/initcpio/install/
cp -v /opt/${repo}/configs/hooks/* /usr/lib/initcpio/hooks/
cp -v /opt/${repo}/configs/script-hooks/* /usr/lib/initcpio/
mkdir -p /etc/pacman.d/hooks
cp -v /opt/${repo}/configs/pacman-hooks/* /etc/pacman.d/hooks/
cp -v /opt/${repo}/make-packages-txt.sh /usr/bin/make-packages-txt.sh
chmod +x /usr/bin/make-packages-txt.sh
# nano
echo "include "/usr/share/nano/*.nanorc"" > /etc/nanorc
2022-10-04 21:12:28 +02:00
# Install rc.local
echo "[Unit]
2022-10-04 19:01:31 +02:00
Description=/etc/rc.local compatibility
[Service]
Type=oneshot
ExecStart=/etc/rc.local
RemainAfterExit=yes
[Install]
2022-10-04 21:12:28 +02:00
WantedBy=multi-user.target" > /etc/systemd/system/rc-local.service
touch $RCLOCAL
chmod +x $RCLOCAL
systemctl enable rc-local.service
if ! grep '#!' $RCLOCAL; then
echo "#!/bin/bash" > $RCLOCAL
fi
2022-10-04 19:01:31 +02:00
2022-10-04 21:12:28 +02:00
if ! grep 'setcap cap_net_raw+ep /bin/ping' $RCLOCAL; then
echo "setcap cap_net_raw+ep /bin/ping" >> $RCLOCAL
fi
2022-10-04 19:01:31 +02:00
2022-10-04 21:12:28 +02:00
# Install rc.shutdown
2022-10-04 19:01:31 +02:00
2022-10-04 21:12:28 +02:00
echo "[Unit]
2022-10-04 19:01:31 +02:00
Description=/etc/rc.local.shutdown Compatibility
ConditionFileIsExecutable=/etc/rc.local.shutdown
DefaultDependencies=no
After=basic.target
Before=shutdown.target
[Service]
Type=oneshot
ExecStart=/etc/rc.local.shutdown
StandardInput=tty
RemainAfterExit=yes
[Install]
2022-10-04 21:12:28 +02:00
WantedBy=multi-user.target" > /etc/systemd/system/rc-local-shutdown.service
touch $RCLOCALSHUTDOWN
chmod +x $RCLOCALSHUTDOWN
systemctl enable rc-local-shutdown.service
if ! grep '#!' $RCLOCALSHUTDOWN; then
echo "#!/bin/bash" > $RCLOCALSHUTDOWN
2022-10-04 19:01:31 +02:00
fi
# set desktop
echo "set desktop"
#
mkdir -p /etc/X11/xinit/
echo "Systemsprache und dienste werden erstellt!"
mkdir -p /etc/X11/xorg.conf.d/
cp -R /opt/${repo}/configs/xorg.conf.d/* /etc/X11/xorg.conf.d/
if ! [ -f "/etc/X11/xorg.conf.d/40-libinput.conf" ]; then
ln -s /usr/share/X11/xorg.conf.d/40-libinput.conf /etc/X11/xorg.conf.d/40-libinput.conf
fi
2022-11-24 09:31:07 +01:00
if ! [ -f "/usr/bin/l" ]; then
ln -s /usr/bin/ls /usr/bin/l
fi
2023-05-31 11:53:51 +02:00
su ${user} -l -c "chezmoi init -v --apply --force https://git.brothertec.eu/simono41/dotfiles.git"
su ${user} -l -c "chezmoi update -v --force"
2022-10-04 19:01:31 +02:00
# https://aur.archlinux.org/packages/ttf-font-nerd-dummy
# I was going to delete it because at the moment the only package that provides ttf-font-nerd is ttf-iosevka-nerd (see this search entry),
# if ttf-iosevka-nerd no longer provides ttf-font-nerd (which can be a possible fix to bug #74050),
# this AUR package will be the only package that provides ttf-font-nerd, in which case it is better deleted.
2023-02-17 15:46:13 +01:00
#if pacman -Rdd ttf-iosevka-nerd --noconfirm; then
# aurinstaller ttf-font-nerd-dummy
#fi
2022-10-04 19:01:31 +02:00
#aurinstaller conky-lua-nv
2022-10-04 19:47:24 +02:00
#aurinstaller ntfysh-bin
2022-10-26 18:56:39 +02:00
#aurinstaller jetbrains-toolbox
# Minecraft-launcher
2023-07-14 20:41:31 +02:00
#aurinstaller polymc-bin
aurinstaller polymc-qt5-bin
2022-10-26 18:56:39 +02:00
# bash beautifier
2022-10-04 19:01:31 +02:00
aurinstaller beautysh
2022-10-26 18:56:39 +02:00
# arandr for wayland
2022-10-04 19:01:31 +02:00
aurinstaller wdisplays
2022-10-26 18:56:39 +02:00
# audio bar
2022-10-06 19:09:23 +02:00
aurinstaller sov
2022-10-26 18:56:39 +02:00
# brightness bar
2022-10-06 19:09:23 +02:00
aurinstaller wob
2022-10-26 18:56:39 +02:00
# logout screen
2022-10-06 19:09:23 +02:00
aurinstaller wlogout
2023-05-02 15:18:27 +02:00
aurinstaller wcp
2022-10-04 19:01:31 +02:00
2023-06-12 11:59:38 +02:00
# SwayNotificationCenter
aurinstaller swaync
2022-10-26 18:56:39 +02:00
# on-screen keyboard (start with wvkbd-mobintl)
aurinstaller wvkbd
2023-05-31 13:59:40 +02:00
# and for x11
aurinstaller svkbd-git
2022-10-26 18:56:39 +02:00
2023-05-09 12:55:38 +02:00
# Visual music player for wayland
aurinstaller vmp
2023-05-02 15:18:27 +02:00
# All your services in one place
2023-05-25 16:57:51 +02:00
#aurinstaller ferdium-bin
2023-05-02 15:18:27 +02:00
2023-05-02 16:13:38 +02:00
# Clipboard Manager
aurinstaller clipman
2023-05-04 11:17:27 +02:00
# OBS-Backgroundremover
aurinstaller obs-backgroundremoval-git
2023-05-04 11:17:27 +02:00
2023-05-05 12:01:51 +02:00
# QT5 Styleplugins (Default GTK Arc-Dark Theme)
aurinstaller qt5-styleplugins
2023-06-08 11:16:36 +02:00
# QT6 Styleplugins (Default GTK Arc-Dark Theme)
aurinstaller qt6gtk2
2023-05-05 12:44:29 +02:00
# Passwortmanager for dmenu (i3)
aurinstaller passdmenu
2023-07-11 00:24:45 +02:00
# Joplin Desktop for Linux, using the system Electron package
aurinstaller joplin-electron
2023-07-12 19:12:19 +02:00
# SwayFX: Sway, but with eye candy!
2023-07-13 09:33:10 +02:00
if pacman -Rss sway --noconfirm; then
echo "Sway erfolgreich entfernt um SwayFX zu installieren :)"
fi
2023-07-12 19:12:19 +02:00
aurinstaller swayfx
# Miracast implementation for GNOME and I3
aurinstaller gnome-network-displays
# thinkpad docking station Ultra
2023-02-03 13:17:27 +01:00
#aurinstaller evdi-git
#aurinstaller displaylink
# Systemd Service (zum testen)
2023-02-03 13:17:27 +01:00
#systemctl enable displaylink
2023-06-01 08:26:34 +02:00
# An open-source Linux userspace driver for Valves Steam Deck hardware.
# https://open-sd.gitlab.io/opensd-docs/opensd-docs/latest/users_manual/running.html
#aurinstaller opensd-git
#systemctl --user enable opensd
2022-10-04 19:01:31 +02:00
# MS-Fonts
mkdir -p /etc/fonts/conf.avail/
cp /opt/${repo}/configs/20-no-embedded.conf /etc/fonts/conf.avail/
if ! [ -f "/etc/fonts/conf.d/20-no-embedded.conf" ]; then
ln -s /etc/fonts/conf.avail/20-no-embedded.conf /etc/fonts/conf.d/
fi
# Clear and regenerate your font cache
fc-cache -f -v
# Icons
gsettings set org.gnome.desktop.interface cursor-theme capitaine-cursors
2023-05-02 14:36:45 +02:00
gsettings set org.gnome.desktop.interface gtk-theme Arc-Dark
2023-05-02 16:13:38 +02:00
gsettings set org.gnome.desktop.interface icon-theme Papirus-Dark
2023-05-02 14:36:45 +02:00
gsettings set org.gnome.desktop.wm.preferences theme "Arc-Dark"
2023-06-08 11:16:36 +02:00
gsettings set org.gnome.desktop.interface color-scheme 'prefer-dark'
gsettings set org.gnome.desktop.default-applications.terminal exec wezterm
gsettings set org.gnome.desktop.default-applications.terminal exec-arg start
2022-10-04 19:01:31 +02:00
gtk-update-icon-cache
userrechte
2022-10-26 19:33:39 +02:00
2022-10-04 19:01:31 +02:00
# grub-updater
if [ -d /etc/grub.d ]; then
cp -v /opt/${repo}/configs/grub.d/* /etc/grub.d/
2022-10-04 19:01:31 +02:00
fi
cp /opt/${repo}/scripts/extract-menuentry.py /usr/bin/extract-menuentry.py
2022-10-04 19:01:31 +02:00
mkdir -p /boot/grub/
grub-mkconfig -o /boot/grub/grub.cfg
#aurupdater
2022-10-04 19:01:31 +02:00
add_locale_settings
if pacman -Qdtq; then
echo "Verwaiste Packete werden entfernt :)"
pacman -Rsn $(pacman -Qdtq) --noconfirm
else
echo "Es müssen keine verwaisten Packete entfernt werden :)"
fi
if ! pacman -Syu --needed --noconfirm; then
echo "Konnte Aktualisierung nicht abschliessen!!!"
fi
mkinitcpio -P -c /etc/mkinitcpio.conf
echo "Erstelle Packetverzeichnis!!!"
if [ "${archisoinstall}" == "y" ]; then
2022-10-06 21:01:04 +02:00
mkdir -p ${mountpoint}/etc/systemd/system/getty\@tty1.service.d/
echo "[Service]" > ${mountpoint}/etc/systemd/system/getty\@tty1.service.d/autologin.conf
echo "ExecStart=" >> ${mountpoint}/etc/systemd/system/getty\@tty1.service.d/autologin.conf
echo "ExecStart=-/usr/bin/agetty --autologin ${user} -s %I 115200,38400,9600 vt102" >> ${mountpoint}/etc/systemd/system/getty\@tty1.service.d/autologin.conf
2022-10-06 21:03:06 +02:00
links
rm -Rv /home/${user}/aur-builds
2022-10-04 19:01:31 +02:00
pacman -Qq > /pkglist.txt
if [ $(ls /var/cache/pacman/pkg | wc -w) -gt 0 ]; then
rm -R /var/cache/pacman/pkg/*
fi
if [ -f /root/.bash_history ]; then
rm /root/.bash_history
fi
if [ -f /home/${user}/.bash_history ]; then
rm /home/${user}/.bash_history
fi
fi
echo "$(date "+%Y%m%d-%H%M%S")"
echo "Fertig!!!"
exit 0