fix: pkg issues

This commit is contained in:
AngeD 2023-11-10 14:08:40 +01:00
parent d5a161318b
commit 49668155d2
10 changed files with 25 additions and 24 deletions

View File

@ -1,5 +1,8 @@
#!/bin/bash -ex #!/bin/bash -ex
cd "$(dirname "$0")" cd "$(dirname "$0")"
. ./config . ./config
. ./src/lib.sh
cat src/dotfiles.sh | arch-chroot /mnt/ su "$username" -c 'bash -ex' cat src/dotfiles.sh | arch-chroot /mnt/ su "$username" -c 'bash -ex'
echo -e "${BOLD}${GREEN}DONE.${NORMAL}"

View File

@ -5,7 +5,7 @@ pkg=(
autorandr autorandr
i3lock xss-lock i3lock xss-lock
picom picom
xorg-{server,xinit,xrandr,xsetroot} xclip xorg-{server,xhost,xinit,xrandr,xsetroot} xclip
) )
# vim: ft=sh # vim: ft=sh

View File

@ -1,6 +1,8 @@
#!/bin/bash -e #!/bin/bash -e
cd "$(dirname "$0")" cd "$(dirname "$0")"
. ../../src/lib.sh
cp -rfT rootfs/ /mnt/ cp -rfT rootfs/ /mnt/
cat config ../../src/lib.sh src/install.sh | arch-chroot /mnt/ bash -ex cat config ../../src/lib.sh src/install.sh | arch-chroot /mnt/ bash -ex
echo -e "${BOLD}${GREEN}DONE${NORMAL}"

View File

@ -1,21 +1,19 @@
#!/bin/bash -ex #!/bin/bash -ex
pac "${pkg[@]}"
# drivers # drivers
case "$(lspci -k | grep -A3 -E '(VGA|3D)')" in case "$(lspci -k | grep -A3 -E '(VGA|3D)')" in
*amdgpu*) *amdgpu*)
pkg=("${pkg[@]}" xf86-video-amdgpu) pac xf86-video-amdgpu
;; ;;
*i915*) *i915*)
pkg=("${pkg[@]}" xf86-video-intel) pac xf86-video-intel
;; ;;
*nouveau*) *nouveau*)
pkg=("${pkg[@]}" xf86-video-nouveau) pac xf86-video-nouveau
;;
*nvidia*)
pac nvidia{,-utils}
;; ;;
esac esac
pac "${pkg[@]}"
git clone https://git.maby.dev/ange/suckless.git /tmp/suckless/
cd /tmp/suckless
./update.sh
echo -e "${BOLD}${GREEN}DONE. I recommend you to install dotfiles.sh to get a fully functioning config.${NORMAL}"

View File

@ -1,4 +1,7 @@
#!/bin/bash -ex #!/bin/bash -ex
cd "$(dirname "$0")" cd "$(dirname "$0")"
. ../src/lib.sh
cat config ../src/lib.sh src/install.sh | arch-chroot /mnt/ bash -ex cat config ../src/lib.sh src/install.sh | arch-chroot /mnt/ bash -ex
echo -e "${BOLD}${GREEN}DONE${NORMAL}"

View File

@ -1,6 +1,6 @@
#!/bin/bash -ex #!/bin/bash -ex
pac "${pkg[@]}" flatpak pac "${pkg[@]}" flatpak xdg-desktop-portal-gtk
flatpak install -y "${flatpakpkg[@]}" flatpak install -y "${flatpakpkg[@]}"
case "$(lspci -k | grep -E '(VGA|3D)')" in case "$(lspci -k | grep -E '(VGA|3D)')" in
@ -18,9 +18,7 @@ case "$(lspci -k | grep -E '(VGA|3D)')" in
;; ;;
esac esac
sed -i "s/^MODULES=(/MODULES=($modules/" /etc/mkinitcpio.conf sed -i "/^MODULES=(/s/)/$modules)/" /etc/mkinitcpio.conf
mkinitcpio -P mkinitcpio -P
xdg-user-dirs-update xdg-user-dirs-update
echo -e "${BOLD}${GREEN}GPU drivers install finished.${NORMAL}"

View File

@ -8,8 +8,8 @@ cd "$(dirname "$0")"
[0-9]*) [0-9]*)
size="$swapfile" size="$swapfile"
;; ;;
true) auto)
ram="$(free -h | awk '$1 == "Mem:" {print $2}')" ram="$(free -m | awk '$1 == "Mem:" {print $2}')"
size="$(python -c "from math import ceil,log; print(2**ceil((log($ram)/log(2))))")" size="$(python -c "from math import ceil,log; print(2**ceil((log($ram)/log(2))))")"
;; ;;
*) *)
@ -31,3 +31,5 @@ cp -rfT rootfs/ /mnt/
genfstab -U /mnt/ >> /mnt/etc/fstab genfstab -U /mnt/ >> /mnt/etc/fstab
cat config src/lib.sh src/install.sh | arch-chroot /mnt/ bash -ex cat config src/lib.sh src/install.sh | arch-chroot /mnt/ bash -ex
echo -e "${BOLD}${GREEN}DONE${NORMAL}"

View File

@ -19,7 +19,7 @@
# Cloudflare: 1.1.1.1#cloudflare-dns.com 1.0.0.1#cloudflare-dns.com 2606:4700:4700::1111#cloudflare-dns.com 2606:4700:4700::1001#cloudflare-dns.com # Cloudflare: 1.1.1.1#cloudflare-dns.com 1.0.0.1#cloudflare-dns.com 2606:4700:4700::1111#cloudflare-dns.com 2606:4700:4700::1001#cloudflare-dns.com
# Google: 8.8.8.8#dns.google 8.8.4.4#dns.google 2001:4860:4860::8888#dns.google 2001:4860:4860::8844#dns.google # Google: 8.8.8.8#dns.google 8.8.4.4#dns.google 2001:4860:4860::8888#dns.google 2001:4860:4860::8844#dns.google
# Quad9: 9.9.9.9#dns.quad9.net 149.112.112.112#dns.quad9.net 2620:fe::fe#dns.quad9.net 2620:fe::9#dns.quad9.net # Quad9: 9.9.9.9#dns.quad9.net 149.112.112.112#dns.quad9.net 2620:fe::fe#dns.quad9.net 2620:fe::9#dns.quad9.net
DNS=1.1.1.1#cloudflare-dns.com DNS=9.9.9.9#dns.quad9.net
FallbackDNS=1.1.1.1 8.8.8.8 FallbackDNS=1.1.1.1 8.8.8.8
Domains=~. Domains=~.
#DNSSEC=no #DNSSEC=no

View File

@ -9,5 +9,3 @@ git clone --bare "$repo" "$HOME/.dotfiles"
"${config[@]}" checkout -f "${config[@]}" checkout -f
"${config[@]}" submodule update --init --recursive --remote "${config[@]}" submodule update --init --recursive --remote
"${config[@]}" config status.showUntrackedFiles no "${config[@]}" config status.showUntrackedFiles no
echo -e "${BOLD}${GREEN}DONE. You need to reboot to apply the changes.${NORMAL}"

View File

@ -59,6 +59,3 @@ initrd /$cpu-ucode.img
options $options rw options $options rw
EOF EOF
done done
echo -e "${BOLD}${GREEN}DONE. You can install a desktop environment \
(see README.md). Then, you can Ctrl+D, umount -R /mnt/ and reboot${NORMAL}"