mirror of
https://github.com/tommytran732/Arch-Setup-Script
synced 2024-10-29 16:21:33 -04:00
Compare commits
No commits in common. "f82897b299ed90de9a7a5ecd47d5dd45110480aa" and "9f56c5b0e2857e7523b685eaef764ee5044b8809" have entirely different histories.
f82897b299
...
9f56c5b0e2
29
install.sh
29
install.sh
@ -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/nvme|sd|mmcblk|vd");
|
||||
select entry in $(lsblk -dpnoNAME|grep -P "/dev/sd|nvme|vd");
|
||||
do
|
||||
disk="${entry}"
|
||||
output "Arch Linux will be installed on the following disk: ${disk}"
|
||||
@ -96,25 +96,15 @@ disk_prompt (){
|
||||
}
|
||||
|
||||
username_prompt (){
|
||||
output 'Please enter the name for a user account:'
|
||||
output 'Enter your username:'
|
||||
read -r username
|
||||
|
||||
if [ -z "${username}" ]; then
|
||||
output 'Sorry, You need to enter a username.'
|
||||
output '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
|
||||
@ -179,7 +169,6 @@ luks_prompt
|
||||
luks_password_prompt
|
||||
disk_prompt
|
||||
username_prompt
|
||||
fullname_prompt
|
||||
user_password_prompt
|
||||
hostname_prompt
|
||||
network_daemon_prompt
|
||||
@ -458,7 +447,6 @@ 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
|
||||
@ -474,7 +462,6 @@ 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
|
||||
@ -557,14 +544,18 @@ arch-chroot /mnt /bin/bash -e <<EOF
|
||||
grub-mkconfig -o /boot/grub/grub.cfg
|
||||
|
||||
# Adding user with sudo privilege
|
||||
useradd -c "$fullname" -m "$username"
|
||||
usermod -aG wheel "$username"
|
||||
useradd -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
|
||||
@ -601,8 +592,6 @@ 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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user