1
0
mirror of https://github.com/tommytran732/Arch-Setup-Script synced 2024-12-26 08:41:58 -05:00

Compare commits

...

5 Commits

Author SHA1 Message Date
funk-on-code
f82897b299
[Corrected] Add a Full Name prompt / Full Name to user creation. (#39)
The correct version, adding a Full Name prompt (improves look of GDM display) and quote $fullname/$username accordingly.

Signed-off-by: funk-on-code <113871227+funk-on-code@users.noreply.github.com>
2024-10-11 16:38:03 -07:00
3769c8e768
Add support for emmc
Signed-off-by: Tommy <contact@tommytran.io>
2024-10-11 16:36:07 -07:00
3948fbd19c
Only configure systemd-resolved on desktop
Signed-off-by: Tommy <contact@tommytran.io>
2024-10-11 14:48:22 -07:00
7f99bd5bed
Fix resolv.conf
Signed-off-by: Tommy <contact@tommytran.io>
2024-10-11 14:42:25 -07:00
32ee17b742
Add missing directories
Signed-off-by: Tommy <contact@tommytran.io>
2024-10-11 14:24:18 -07:00

View File

@ -87,7 +87,7 @@ luks_password_prompt () {
disk_prompt (){
lsblk
output 'Please select the number of the corresponding disk (e.g. 1):'
select entry in $(lsblk -dpnoNAME|grep -P "/dev/sd|nvme|vd");
select entry in $(lsblk -dpnoNAME|grep -P "/dev/nvme|sd|mmcblk|vd");
do
disk="${entry}"
output "Arch Linux will be installed on the following disk: ${disk}"
@ -96,15 +96,25 @@ disk_prompt (){
}
username_prompt (){
output 'Enter your username:'
output 'Please enter the name for a user account:'
read -r username
if [ -z "${username}" ]; then
output 'You need to enter a username.'
output 'Sorry, You need to enter a username.'
username_prompt
fi
}
fullname_prompt (){
output 'Please enter the full name for the user account:'
read -r fullname
if [ -z "${fullname}" ]; then
output 'Please enter the full name of the users account.'
fullname_prompt
fi
}
user_password_prompt () {
output 'Enter your user password (the password will not be shown on the screen):'
read -r -s user_password
@ -169,6 +179,7 @@ luks_prompt
luks_password_prompt
disk_prompt
username_prompt
fullname_prompt
user_password_prompt
hostname_prompt
network_daemon_prompt
@ -447,6 +458,7 @@ fi
## Setup NTS
unpriv curl -s https://raw.githubusercontent.com/GrapheneOS/infrastructure/main/chrony.conf | tee /mnt/etc/chrony.conf > /dev/null
mkdir -p /mnt/etc/sysconfig
unpriv curl -s https://raw.githubusercontent.com/TommyTran732/Linux-Setup-Scripts/main/etc/sysconfig/chronyd | tee /mnt/etc/sysconfig/chronyd > /dev/null
## Remove nullok from system-auth
@ -462,6 +474,7 @@ mkdir -p /mnt/etc/systemd/system/sshd.service.d/
unpriv curl -s https://raw.githubusercontent.com/GrapheneOS/infrastructure/main/systemd/system/sshd.service.d/local.conf | tee /mnt/etc/systemd/system/sshd.service.d/override.conf > /dev/null
## Disable coredump
mkdir -p /mnt/etc/security/limits.d/
unpriv curl -s https://raw.githubusercontent.com/TommyTran732/Linux-Setup-Scripts/main/etc/security/limits.d/30-disable-coredump.conf | tee /mnt/etc/security/limits.d/30-disable-coredump.conf > /dev/null
mkdir -p /mnt/etc/systemd/coredump.conf.d
unpriv curl -s https://raw.githubusercontent.com/TommyTran732/Linux-Setup-Scripts/main/etc/systemd/coredump.conf.d/disable.conf | tee /mnt/etc/systemd/coredump.conf.d/disable.conf > /dev/null
@ -544,18 +557,14 @@ arch-chroot /mnt /bin/bash -e <<EOF
grub-mkconfig -o /boot/grub/grub.cfg
# Adding user with sudo privilege
useradd -m $username
usermod -aG wheel $username
useradd -c "$fullname" -m "$username"
usermod -aG wheel "$username"
if [ "${install_mode}" = 'desktop' ]; then
# Setting up dconf
dconf update
fi
# Use systemd-resolved for DNS resolution
rm /etc/resolv.conf
ln -s /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf
# Snapper configuration
umount /.snapshots
rm -r /.snapshots
@ -592,6 +601,8 @@ fi
if [ "${install_mode}" = 'desktop' ]; then
systemctl enable gdm --root=/mnt
rm /mnt/etc/resolv.conf
ln -s /run/systemd/resolve/stub-resolv.conf /mnt/etc/resolv.conf
systemctl enable systemd-resolved --root=/mnt
fi