forked from dataprolet/Arch-Linux-Installer
fix ccreate config as user
This commit is contained in:
+12
-18
@@ -207,10 +207,7 @@ echo "Decrypting.. This also might take a while."
|
|||||||
echo
|
echo
|
||||||
echo -en "${pwcr}\n${pwcr}" | cryptsetup luksOpen "/dev/${main}" main
|
echo -en "${pwcr}\n${pwcr}" | cryptsetup luksOpen "/dev/${main}" main
|
||||||
echo "Partition successfully opened."
|
echo "Partition successfully opened."
|
||||||
echo
|
clear
|
||||||
|
|
||||||
lsblk | grep "${dev}"
|
|
||||||
echo
|
|
||||||
|
|
||||||
##########
|
##########
|
||||||
|
|
||||||
@@ -245,10 +242,7 @@ mount -o autodefrag,compress=zstd:3,subvol=home "/dev/mapper/main" "/mnt/home"
|
|||||||
mkdir "/mnt/boot"
|
mkdir "/mnt/boot"
|
||||||
mount "/dev/${boot}" "/mnt/boot"
|
mount "/dev/${boot}" "/mnt/boot"
|
||||||
echo "Mounting complete."
|
echo "Mounting complete."
|
||||||
echo
|
clear
|
||||||
|
|
||||||
lsblk -a
|
|
||||||
echo
|
|
||||||
|
|
||||||
##########
|
##########
|
||||||
|
|
||||||
@@ -340,7 +334,7 @@ all_packages=(
|
|||||||
pacstrap "/mnt" "${all_packages[@]}"
|
pacstrap "/mnt" "${all_packages[@]}"
|
||||||
|
|
||||||
echo "Base system installed."
|
echo "Base system installed."
|
||||||
echo
|
clear
|
||||||
|
|
||||||
##########
|
##########
|
||||||
|
|
||||||
@@ -375,15 +369,6 @@ arch-chroot "/mnt" localectl set-locale LANG=en_US.UTF-8
|
|||||||
|
|
||||||
echo "KEYMAP=de-latin1-nodeadkeys" > "/mnt/etc/vconsole.conf"
|
echo "KEYMAP=de-latin1-nodeadkeys" > "/mnt/etc/vconsole.conf"
|
||||||
arch-chroot /mnt localectl set-keymap --no-convert de-latin1-nodeadkeys
|
arch-chroot /mnt localectl set-keymap --no-convert de-latin1-nodeadkeys
|
||||||
|
|
||||||
# Create keyboard layout
|
|
||||||
config_dir="/mnt/home/${user}/.config"
|
|
||||||
mkdir -p "${config_dir}"
|
|
||||||
cat << EOF > "${config_dir}/kxkbrc"
|
|
||||||
[Layout]
|
|
||||||
LayoutList=de
|
|
||||||
Use=true
|
|
||||||
EOF
|
|
||||||
echo "Done."
|
echo "Done."
|
||||||
echo
|
echo
|
||||||
|
|
||||||
@@ -469,6 +454,15 @@ arch-chroot /mnt useradd -m "${user}"
|
|||||||
echo -en "${pwur}\n${pwur}" | arch-chroot /mnt passwd "${user}"
|
echo -en "${pwur}\n${pwur}" | arch-chroot /mnt passwd "${user}"
|
||||||
arch-chroot /mnt gpasswd -a "${user}" wheel
|
arch-chroot /mnt gpasswd -a "${user}" wheel
|
||||||
sed -i '82s/.*/%wheel ALL=(ALL) ALL/' /mnt/etc/sudoers
|
sed -i '82s/.*/%wheel ALL=(ALL) ALL/' /mnt/etc/sudoers
|
||||||
|
|
||||||
|
# Create keyboard layout
|
||||||
|
config_dir="/mnt/home/${user}/.config"
|
||||||
|
sudo -u "${user}" mkdir -p "${config_dir}"
|
||||||
|
sudo -u "${user}" cat << EOF > "${config_dir}/kxkbrc"
|
||||||
|
[Layout]
|
||||||
|
LayoutList=de
|
||||||
|
Use=true
|
||||||
|
EOF
|
||||||
echo "Done."
|
echo "Done."
|
||||||
echo
|
echo
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user