fix: flatpak not installing + services fails

This commit is contained in:
ange 2024-05-25 18:01:11 +02:00
parent 891bb949bf
commit 11b35cdf38
Signed by: ange
GPG Key ID: 9E0C4157BB7BEB1D
8 changed files with 25 additions and 28 deletions

View File

@ -1,22 +1,21 @@
#!/bin/bash #!/bin/bash
#shellcheck disable=SC2154 #shellcheck disable=SC2154
for i in ./modules/prechroot/*.sh; do for i in modules/prechroot/*.sh; do
bash -x "$i" bash -x "$i"
done done
cp -r ./modules/chroot/ /mnt/ cp -r modules/chroot/ /mnt/
(cd ./modules/ || exit
for i in ./chroot/*.sh; do
arch-chroot /mnt/ bash -x "/$i"
done
for i in ./chroot/user/*.sh; do for i in modules/chroot/*.sh; do
arch-chroot /mnt/ su - "$username" -c "bash -x '/$i'" arch-chroot /mnt bash -x "${i/modules/}"
done done
)
for i in ./modules/postchroot/*.sh; do for i in modules/chroot/user/*.sh; do
arch-chroot /mnt su - "$username" -c "bash -x '${i/modules/}'"
done
for i in modules/postchroot/*.sh; do
bash -x "$i" bash -x "$i"
done done

View File

@ -6,7 +6,7 @@ hwclock --systohc
while read -r l; do while read -r l; do
sed -i "/^#\s*$l.UTF-8/s/^#\s*//" /etc/locale.gen sed -i "/^#\s*$l.UTF-8/s/^#\s*//" /etc/locale.gen
done < <(sed 's/,/\n/g' "$locales") done <<< "${locales//,/$'\n'}"
locale-gen locale-gen
echo "LANG=$lang.UTF-8" > /etc/locale.conf echo "LANG=$lang.UTF-8" > /etc/locale.conf

View File

@ -4,5 +4,5 @@
shell="$(sed -n "/$shell/{p;q}" /etc/shells)" shell="$(sed -n "/$shell/{p;q}" /etc/shells)"
useradd -mG wheel,video "$username" -s "${shell:-/bin/bash}" useradd -mG wheel,video "$username" -s "${shell:-/bin/bash}"
echo "root:$rootpasswd" | chpasswd echo "root:$rootpasswd" | chpasswd
echo "$username:$userpasswd" | chpasswd echo "$username:$userpasswd" | chpasswd

View File

@ -1,11 +1,10 @@
#!/bin/bash #!/bin/bash
#shellcheck disable=SC2154 #shellcheck disable=SC2154
systemctl enable \ systemctl enable iwd.service
iwd.service \ systemctl enable nftables.service
nftables.service \ systemctl enable reflector.timer
reflector.timer \ systemctl enable systemd-networkd.service
systemd-networkd.service \ systemctl enable systemd-resolved.service
systemd-resolved.service \ systemctl enable systemd-timesyncd.service
systemd-timesyncd.service \ systemctl enable tlp.service
tlp.service

View File

@ -1,4 +1,4 @@
#!/bin/bash #!/bin/bash
#shellcheck disable=SC2154 #shellcheck disable=SC2154
[ -s flatpak.txt ] && xargs flatpak install -y < flatpak.txt [ -s /chroot/flatpak.txt ] && xargs flatpak install -y < /chroot/flatpak.txt

View File

@ -31,7 +31,7 @@ printf '%s\n' \
org.gimp.GIMP \ org.gimp.GIMP \
org.gtk.Gtk3theme.Materia-dark \ org.gtk.Gtk3theme.Materia-dark \
org.mozilla.firefox \ org.mozilla.firefox \
>> flatpak.txt >> modules/chroot/flatpak.txt
case "$(lspci | grep 'VGA\|3D')" in case "$(lspci | grep 'VGA\|3D')" in
*AMD*) echo vulkan-radeon >> pkglist.txt ;; *AMD*) echo vulkan-radeon >> pkglist.txt ;;

View File

@ -6,7 +6,6 @@ GREEN=$'\e[32m'
NORMAL=$'\e[0m' NORMAL=$'\e[0m'
echo "${BOLD}${GREEN}DONE. Umount? [Y/n]${NORMAL} " && read -r ANS echo "${BOLD}${GREEN}DONE. Umount? [Y/n]${NORMAL} " && read -r ANS
case "$ANS" in case "$ANS" in
''|[Yy]*) ;; ''|[Yy]*) ;;
*) exit ;; *) exit ;;

View File

@ -2,17 +2,17 @@
#shellcheck disable=SC2154 #shellcheck disable=SC2154
case "$(lscpu)" in case "$(lscpu)" in
*AMD*) echo amd-ucode >> pkglist.txt ;; *AMD*) echo amd-ucode >> pkglist.txt ;;
*Intel*) echo intel-ucode >> pkglist.txt ;; *Intel*) echo intel-ucode >> pkglist.txt ;;
*) ;; *) ;;
esac esac
[ -s "$flatpakpkg" ] \ [ -s modules/chroot/flatpak.txt ] \
&& printf '%s\n' flatpak xdg-desktop-portal-gtk >> pkglist.txt && printf '%s\n' flatpak xdg-desktop-portal-gtk >> pkglist.txt
[ -f /sys/class/power_supply/BAT0 ] && echo tlp >> pkglist.txt [ -f /sys/class/power_supply/BAT0 ] && echo tlp >> pkglist.txt
pacstrap -C rootfs/etc/pacman.conf -K /mnt/ \ pacstrap -C rootfs/etc/pacman.conf -K /mnt \
base linux{,-lts,-firmware} "$shell" - < pkglist.txt base linux{,-lts,-firmware} "$shell" - < pkglist.txt
find /mnt/etc -name '*.pacnew' -delete find /mnt/etc/ -name '*.pacnew' -delete