1
0
mirror of https://github.com/tommytran732/Arch-Setup-Script synced 2024-10-29 16:21:33 -04:00

Compare commits

...

5 Commits

Author SHA1 Message Date
funk-on-code
581225cc27
Merge 162f026966 into 9f56c5b0e2 2024-09-19 20:40:39 -07:00
9f56c5b0e2
Add permission control for workflow
Signed-off-by: Tommy <contact@tommytran.io>
2024-09-10 16:23:03 -07:00
funk-on-code
0e0cfa9f52
Workaround for systemd-networkd (#45)
The archlinux ISO provides working networking, use it to provide working networking for server installs on first-boot.

Signed-off-by: funk-on-code <113871227+funk-on-code@users.noreply.github.com>
2024-09-10 16:19:53 -07:00
funk-on-code
9d9c42c414
Fix chronyd configuration location (#48)
Signed-off-by: funk-on-code <113871227+funk-on-code@users.noreply.github.com>
2024-08-25 19:11:56 -07:00
funk-on-code
162f026966
[Corrected] Add a Full Name prompt / Full Name to user creation.
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-08-05 22:59:22 +10:00
2 changed files with 27 additions and 9 deletions

View File

@ -28,8 +28,10 @@ on:
jobs: jobs:
shellcheck: shellcheck:
name: Bash syntax checker name: Shell syntax checker
runs-on: ubuntu-latest runs-on: ubuntu-24.04
permissions:
contents: read
steps: steps:
- name: Checkout code - name: Checkout code
uses: actions/checkout@v4 uses: actions/checkout@v4

View File

@ -96,15 +96,25 @@ disk_prompt (){
} }
username_prompt (){ username_prompt (){
output 'Enter your username:' output 'Please enter the name for a user account:'
read -r username read -r username
if [ -z "${username}" ]; then if [ -z "${username}" ]; then
output 'You need to enter a username.' output 'Sorry, You need to enter a username.'
username_prompt username_prompt
fi 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 () { user_password_prompt () {
output 'Enter your user password (the password will not be shown on the screen):' output 'Enter your user password (the password will not be shown on the screen):'
read -r -s user_password read -r -s user_password
@ -169,6 +179,7 @@ luks_prompt
luks_password_prompt luks_password_prompt
disk_prompt disk_prompt
username_prompt username_prompt
fullname_prompt
user_password_prompt user_password_prompt
hostname_prompt hostname_prompt
network_daemon_prompt network_daemon_prompt
@ -447,7 +458,7 @@ fi
## Setup NTS ## Setup NTS
unpriv curl -s https://raw.githubusercontent.com/GrapheneOS/infrastructure/main/chrony.conf | tee /mnt/etc/chrony.conf > /dev/null unpriv curl -s https://raw.githubusercontent.com/GrapheneOS/infrastructure/main/chrony.conf | tee /mnt/etc/chrony.conf > /dev/null
unpriv curl -s https://raw.githubusercontent.com/TommyTran732/Linux-Setup-Scripts/main/etc/sysconfig/chronyd | tee /etc/sysconfig/chronyd > /dev/null 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 ## Remove nullok from system-auth
sed -i 's/nullok//g' /mnt/etc/pam.d/system-auth sed -i 's/nullok//g' /mnt/etc/pam.d/system-auth
@ -511,6 +522,11 @@ if [ "${network_daemon}" = 'networkmanager' ]; then
unpriv curl -s https://gitlab.com/divested/brace/-/raw/master/brace/usr/lib/systemd/system/NetworkManager.service.d/99-brace.conf | tee /mnt/etc/systemd/system/NetworkManager.service.d/99-brace.conf > /dev/null unpriv curl -s https://gitlab.com/divested/brace/-/raw/master/brace/usr/lib/systemd/system/NetworkManager.service.d/99-brace.conf | tee /mnt/etc/systemd/system/NetworkManager.service.d/99-brace.conf > /dev/null
fi fi
if [ "${network_daemon}" = 'systemd-networkd' ]; then
# arch-iso has working networking, booted does not.
cp -ap /etc/systemd/network/20* /mnt/etc/systemd/network/ > /dev/null
fi
## Configuring the system. ## Configuring the system.
arch-chroot /mnt /bin/bash -e <<EOF arch-chroot /mnt /bin/bash -e <<EOF
@ -539,8 +555,8 @@ arch-chroot /mnt /bin/bash -e <<EOF
grub-mkconfig -o /boot/grub/grub.cfg grub-mkconfig -o /boot/grub/grub.cfg
# Adding user with sudo privilege # Adding user with sudo privilege
useradd -m $username useradd -c "$fullname" -m "$username"
usermod -aG wheel $username usermod -aG wheel "$username"
if [ "${install_mode}" = 'desktop' ]; then if [ "${install_mode}" = 'desktop' ]; then
# Setting up dconf # Setting up dconf