feat: copy chroot to /mnt/

This commit is contained in:
ange 2024-05-25 15:59:32 +02:00
parent 2f3664acaa
commit 0a2b926e9d
Signed by: ange
GPG key ID: 9E0C4157BB7BEB1D
16 changed files with 27 additions and 13 deletions

View file

@ -1,14 +0,0 @@
#!/bin/bash
#shellcheck disable=SC2154
ln -sf "/usr/share/zoneinfo/$tz" /etc/localtime
hwclock --systohc
for l in "${locales[@]}"; do
sed -i "/^#\s*$l.UTF-8/s/^#\s*//" /etc/locale.gen
done
locale-gen
echo "LANG=$lang.UTF-8" > /etc/locale.conf
echo - "$hostname" > /etc/hostname

View file

@ -1,20 +0,0 @@
#!/bin/bash
#shellcheck disable=SC2154
bootctl install
root="$(findmnt -nr -o source /)"
cryptdev="$(cryptsetup status "$root" | awk '/device/ {print $2}')"
[ -n "$cryptdev" ] && {
uuid="$(blkid | grep "$cryptdev" | awk '{print $2}')"
options="cryptdevice=$uuid:$(basename "$root") "
}
options="${options}root=$root"
for f in /boot/loader/entries/*.conf; do
cat << EOF >> "$f"
options $options rw
EOF
done

View file

@ -1,8 +0,0 @@
#!/bin/bash
#shellcheck disable=SC2154
shell="$(sed -n "/$shell/{p;q}" /etc/shells)"
useradd -mG wheel,video "$username" -s "${shell:-/bin/bash}"
echo "root:$root_passwd" | chpasswd
echo - "$username:$user_passwd" | chpasswd

View file

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

View file

@ -1,4 +0,0 @@
#!/bin/bash
#shellcheck disable=SC2154
[ -n "$flatpak" ] && flatpak install -y "${flatpak[@]}"