bump: 202510
This commit is contained in:
parent
fa579eba0b
commit
b0add9b2cd
20 changed files with 75 additions and 98 deletions
|
|
@ -11,29 +11,32 @@ root=/dev/disk/by-partlabel/root
|
|||
|
||||
if [ -n "$disk_passwd" ]; then
|
||||
echo -n "$disk_passwd" | cryptsetup luksFormat "$root" -
|
||||
cryptsetup open "$root" cryptroot - <<< "$disk_passwd"
|
||||
root=/dev/mapper/cryptroot
|
||||
cryptsetup open "$root" root - <<< "$disk_passwd"
|
||||
root=/dev/mapper/root
|
||||
fi
|
||||
|
||||
sleep 5 # wait /dev/disk/by-partlabel/
|
||||
while ! [ -e "$root" ] || ! [ -e "$esp" ]; do
|
||||
echo 'waiting for /dev/disk/by-partlabel/ to be populated' >&2
|
||||
sleep 1
|
||||
done
|
||||
|
||||
mkfs.vfat -F32 "$esp"
|
||||
mkfs.ext4 -F "$root"
|
||||
mount "$root" /mnt/
|
||||
mount -m "$esp" /mnt/efi/
|
||||
|
||||
mkdir -p /mnt/etc/ /mnt/efi/EFI/Linux/
|
||||
|
||||
cat <<EOF > /mnt/etc/fstab
|
||||
UUID=$(blkid "$root" -ovalue -sUUID) / ext4 rw,relatime 0 1
|
||||
UUID=$(blkid "$esp" -ovalue -sUUID) /efi vfat rw,fmask=0077,dmask=0077,noauto 0 2
|
||||
UUID=$(blkid "$esp" -ovalue -sUUID) /efi vfat rw,fmask=0077,dmask=0077 0 2
|
||||
EOF
|
||||
|
||||
if [ -n "$swapfile" ]; then
|
||||
dd if=/dev/zero of=/mnt/swapfile bs=1M count="$swapfile" status=progress
|
||||
chmod 600 /mnt/swapfile
|
||||
mkswap /mnt/swapfile
|
||||
swapon /mnt/swapfile
|
||||
echo "/swapfile none swap defaults 0 0" >> /mnt/etc/fstab
|
||||
fi
|
||||
|
||||
cp -rfTv rootfs/ /mnt/
|
||||
|
||||
swapoff /mnt/swapfile
|
||||
|
|
|
|||
|
|
@ -2,17 +2,16 @@
|
|||
#shellcheck disable=SC2154
|
||||
|
||||
case "$(lscpu)" in
|
||||
*AMD*) echo amd-ucode >> pkglist.txt ;;
|
||||
*Intel*) echo intel-ucode >> pkglist.txt ;;
|
||||
*) ;;
|
||||
*AMD*) printf '%s\n' amd-ucode >> pkglist.txt ;;
|
||||
*Intel*) printf '%s\n' intel-ucode >> pkglist.txt ;;
|
||||
esac
|
||||
|
||||
if [ -d /sys/class/power_supply/BAT0 ]; then
|
||||
echo tlp >> pkglist.txt
|
||||
printf '%s\n' tlp >> pkglist.txt
|
||||
fi
|
||||
|
||||
echo "$shell" >> pkglist.txt
|
||||
printf '%s\n' "$shell" >> pkglist.txt
|
||||
pacstrap -C rootfs/etc/pacman.conf -K /mnt \
|
||||
base linux{,-lts,-firmware} efibootmgr sbctl - < pkglist.txt
|
||||
linux{,-lts,-firmware} efibootmgr sbctl pacman archlinux-keyring - < pkglist.txt
|
||||
|
||||
find /mnt/etc/ -name '*.pacnew' -delete
|
||||
|
|
|
|||
|
|
@ -4,11 +4,8 @@
|
|||
ln -sf "/usr/share/zoneinfo/$tz" /etc/localtime
|
||||
hwclock --systohc
|
||||
|
||||
while read -r l; do
|
||||
sed -i "/^#\s*$l.UTF-8/s/^#\s*//" /etc/locale.gen
|
||||
done <<< "${locales//,/$'\n'}"
|
||||
(IFS='|'; sed -Ei "/^#(${locales[*]})\.UTF-8/s/#//" /etc/locale.gen)
|
||||
locale-gen
|
||||
|
||||
echo "LANG=$lang.UTF-8" > /etc/locale.conf
|
||||
|
||||
echo "$hostname" > /etc/hostname
|
||||
|
|
|
|||
|
|
@ -1,8 +1,7 @@
|
|||
#!/bin/bash
|
||||
#shellcheck disable=SC2154
|
||||
|
||||
root="$(findmnt -n -osource /)"
|
||||
boot="$(lsblk -ls -oname /dev/disk/by-partlabel/boot | tail -n1)"
|
||||
esp="$(lsblk -ls -opath /dev/disk/by-partlabel/esp | tail -n1)"
|
||||
|
||||
cryptdev="$(cryptsetup status "$root" | awk '/device/ {print $2}')"
|
||||
if [ -n "$cryptdev" ]; then
|
||||
|
|
@ -15,8 +14,8 @@ options="${options}root=$root rw"
|
|||
sbctl create-keys
|
||||
sbctl enroll-keys
|
||||
|
||||
for l in arch{,-lts-fallback}; do
|
||||
for l in arch-linux{,-lts-fallback}; do
|
||||
efibootmgr --create --unicode --label "$l" \
|
||||
--disk "$boot" --part 1 --loader "\\EFI\\Linux\\arch-linux$l.efi"
|
||||
--disk "$esp" --part 1 --loader "\\EFI\\Linux\\$l.efi"
|
||||
done
|
||||
echo "$options" > /etc/cmdline.d/root.conf
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
#!/bin/bash
|
||||
#shellcheck disable=SC2154
|
||||
|
||||
systemctl enable iwd.service
|
||||
systemctl enable nftables.service
|
||||
|
|
|
|||
|
|
@ -1,5 +0,0 @@
|
|||
#!/bin/bash
|
||||
#shellcheck disable=SC2154
|
||||
|
||||
git clone --depth 1 https://git.maby.dev/ange/.dotfiles.git /tmp/dotfiles
|
||||
/tmp/dotfiles/.config/suckless/update.sh
|
||||
4
modules/10-chroot/50-dwm.sh.dwm
Normal file
4
modules/10-chroot/50-dwm.sh.dwm
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
#!/bin/bash
|
||||
|
||||
git clone --depth 1 https://git.gmoker.com/ange/dotfiles.git /tmp/dotfiles
|
||||
/tmp/dotfiles/.config/suckless/install.sh
|
||||
|
|
@ -1,5 +1,4 @@
|
|||
#!/bin/bash
|
||||
#shellcheck disable=SC2154
|
||||
|
||||
config=(git --git-dir "$HOME/.dotfiles" --work-tree "$HOME")
|
||||
repo='https://git.gmoker.com/ange/dotfiles.git'
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
#!/bin/bash
|
||||
#shellcheck disable=SC2154
|
||||
|
||||
BOLD=$'\e[1m'
|
||||
GREEN=$'\e[32m'
|
||||
|
|
|
|||
|
|
@ -1,22 +1,18 @@
|
|||
#!/bin/bash
|
||||
#shellcheck disable=SC2154
|
||||
|
||||
for i in modules/00-prechroot/*.sh; do
|
||||
bash -x "$i"
|
||||
for f in modules/00-prechroot/*.sh; do
|
||||
bash -x "$f"
|
||||
done
|
||||
|
||||
cp -r modules/chroot/ /mnt/
|
||||
|
||||
for i in modules/10-chroot/*.sh; do
|
||||
arch-chroot /mnt bash -x "${i/modules/}"
|
||||
for f in modules/10-chroot/*.sh; do
|
||||
arch-chroot /mnt bash -x < "$f"
|
||||
done
|
||||
|
||||
for i in modules/10-chroot/user/*.sh; do
|
||||
arch-chroot /mnt su - "$username" -c "bash -x '${i/modules/}'"
|
||||
for f in modules/10-chroot/user/*.sh; do
|
||||
arch-chroot /mnt su - "$username" -c "bash -x" < "$f"
|
||||
done
|
||||
|
||||
for i in modules/20-postchroot/*.sh; do
|
||||
bash -x "$i"
|
||||
done
|
||||
|
||||
rm -rf /mnt/chroot/
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
#!/bin/bash
|
||||
#shellcheck disable=SC2154
|
||||
|
||||
#newsraft
|
||||
printf '%s\n' \
|
||||
|
|
@ -15,20 +14,18 @@ printf '%s\n' \
|
|||
mpv \
|
||||
noto-fonts{,-cjk,-emoji} otf-font-awesome \
|
||||
pass-otp gcr \
|
||||
pipewire{-pulse,-jack} playerctl \
|
||||
polkit-gnome \
|
||||
pipewire-jack playerctl rtkit \
|
||||
qemu-{base,audio-pipewire,hw-usb-host,hw-display-virtio-{gpu,vga},ui-gtk} dnsmasq usbutils \
|
||||
udisks2 \
|
||||
xdg-utils xdg-user-dirs \
|
||||
yt-dlp \
|
||||
zathura-pdf-poppler \
|
||||
zenity \
|
||||
>> pkglist.txt
|
||||
|
||||
case "$(lspci | grep 'VGA\|3D')" in
|
||||
*AMD*) echo vulkan-radeon mesa >> pkglist.txt ;;
|
||||
*Intel*) echo vulkan-intel intel-media-driver >> pkglist.txt ;;
|
||||
*NVIDIA*) echo vulkan-nouveau mesa >> pkglist.txt ;;
|
||||
*AMD*) printf '%s\n' vulkan-radeon mesa >> pkglist.txt ;;
|
||||
*Intel*) printf '%s\n' vulkan-intel intel-media-driver >> pkglist.txt ;;
|
||||
*NVIDIA*) printf '%s\n' vulkan-nouveau mesa >> pkglist.txt ;;
|
||||
*) ;;
|
||||
esac
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
#!/bin/bash
|
||||
#shellcheck disable=SC2154
|
||||
|
||||
printf '%s\n' \
|
||||
i3lock xss-lock \
|
||||
|
|
@ -8,17 +7,13 @@ printf '%s\n' \
|
|||
>> pkglist.txt
|
||||
|
||||
case "$(lsmod)" in
|
||||
*amdgpu*) echo xf86-video-amdgpu >> pkglist.txt ;;
|
||||
*i915*)
|
||||
# https://wiki.archlinux.org/title/Intel_graphics#Installation
|
||||
#echo xf86-video-intel >> pkglist.txt
|
||||
;;
|
||||
*nouveau*)
|
||||
# https://bugs.freedesktop.org/show_bug.cgi?id=94844#c3
|
||||
#echo xf86-video-nouveau >> pkglist.txt
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
*amdgpu*) printf '%s\n' xf86-video-amdgpu >> pkglist.txt ;;
|
||||
|
||||
# https://wiki.archlinux.org/title/Intel_graphics#Installation
|
||||
#*i915*) printf '%s\n' xf86-video-intel >> pkglist.txt ;;
|
||||
|
||||
# https://bugs.freedesktop.org/show_bug.cgi?id=94844#c3
|
||||
#*nouveau*) printf '%s\n' xf86-video-nouveau >> pkglist.txt ;;
|
||||
esac
|
||||
|
||||
find ./modules/ -name '*.sh.dwm' -exec rename '.dwm' '' '{}' +
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue