This commit is contained in:
71Zombie 2021-10-27 07:56:20 -04:00
commit 57aaf763bb
3 changed files with 16 additions and 8 deletions

View File

@ -152,10 +152,16 @@ echo "-- Check for low memory systems <8G --"
echo "--------------------------------------" echo "--------------------------------------"
TOTALMEM=$(cat /proc/meminfo | grep -i 'memtotal' | grep -o '[[:digit:]]*') TOTALMEM=$(cat /proc/meminfo | grep -i 'memtotal' | grep -o '[[:digit:]]*')
if [[ $TOTALMEM -lt 8000000 ]]; then if [[ $TOTALMEM -lt 8000000 ]]; then
dd if=/dev/zero of=/swapfile bs=1M count=2048 status=progress #Put swap into the actual system, not into RAM disk, otherwise there is no point in it, it'll cache RAM into RAM. So, /mnt/ everything.
chmod 600 /swapfile mkdir /mnt/opt/swap #make a dir that we can apply NOCOW to to make it btrfs-friendly.
mkswap /swapfile chattr +C /mnt/opt/swap #apply NOCOW, btrfs needs that.
swapon /swapfile dd if=/dev/zero of=/mnt/opt/swap/swapfile bs=1M count=2048 status=progress
chmod 600 /mnt/opt/swap/swapfile #set permissions.
chown root /mnt/opt/swap/swapfile
mkswap /mnt/opt/swap/swapfile
swapon /mnt/opt/swap/swapfile
#The line below is written to /mnt/ but doesn't contain /mnt/, since it's just / for the sysytem itself.
echo "/opt/swap/swapfile none swap sw 0 0" >> /mnt/etc/fstab #Add swap to fstab, so it KEEPS working after installation.
fi fi
echo "--------------------------------------" echo "--------------------------------------"
echo "-- SYSTEM READY FOR 0-setup --" echo "-- SYSTEM READY FOR 0-setup --"

View File

@ -20,17 +20,18 @@ echo "Setting up mirrors for optimal download "
echo "-------------------------------------------------" echo "-------------------------------------------------"
pacman -S --noconfirm pacman-contrib curl pacman -S --noconfirm pacman-contrib curl
pacman -S --noconfirm reflector rsync pacman -S --noconfirm reflector rsync
iso=$(curl -4 ifconfig.co/country-iso)
cp /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.bak cp /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.bak
nc=$(grep -c ^processor /proc/cpuinfo) nc=$(grep -c ^processor /proc/cpuinfo)
echo "You have " $nc" cores." echo "You have " $nc" cores."
echo "-------------------------------------------------" echo "-------------------------------------------------"
echo "Changing the makeflags for "$nc" cores." echo "Changing the makeflags for "$nc" cores."
TOTALMEM=$(cat /proc/meminfo | grep -i 'memtotal' | grep -o '[[:digit:]]*')
if [[ $TOTALMEM -gt 8000000 ]]; then
sudo sed -i 's/#MAKEFLAGS="-j2"/MAKEFLAGS="-j$nc"/g' /etc/makepkg.conf sudo sed -i 's/#MAKEFLAGS="-j2"/MAKEFLAGS="-j$nc"/g' /etc/makepkg.conf
echo "Changing the compression settings for "$nc" cores." echo "Changing the compression settings for "$nc" cores."
sudo sed -i 's/COMPRESSXZ=(xz -c -z -)/COMPRESSXZ=(xz -c -T $nc -z -)/g' /etc/makepkg.conf sudo sed -i 's/COMPRESSXZ=(xz -c -z -)/COMPRESSXZ=(xz -c -T $nc -z -)/g' /etc/makepkg.conf
fi
echo "-------------------------------------------------" echo "-------------------------------------------------"
echo " Setup Language to US and set locale " echo " Setup Language to US and set locale "
echo "-------------------------------------------------" echo "-------------------------------------------------"
@ -38,7 +39,7 @@ sed -i 's/^#en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen
locale-gen locale-gen
timedatectl --no-ask-password set-timezone America/Chicago timedatectl --no-ask-password set-timezone America/Chicago
timedatectl --no-ask-password set-ntp 1 timedatectl --no-ask-password set-ntp 1
localectl --no-ask-password set-locale LANG="en_US.UTF-8" LC_COLLATE="" LC_TIME="en_US.UTF-8" localectl --no-ask-password set-locale LANG="en_US.UTF-8" LC_TIME="en_US.UTF-8"
# Set keymaps # Set keymaps
localectl --no-ask-password set-keymap us localectl --no-ask-password set-keymap us
@ -145,6 +146,7 @@ PKGS=(
'networkmanager' 'networkmanager'
'nodejs' 'nodejs'
'ntfs-3g' 'ntfs-3g'
'ntp'
'okular' 'okular'
'openbsd-netcat' 'openbsd-netcat'
'openssh' 'openssh'

View File

@ -58,7 +58,7 @@ the previews for each theme in the [section](#previews) below or in this other
### Conda ### Conda
If you using the ``conda`` package manager, you may also install these themes If you're using the ``conda`` package manager, you may also want to install these themes
with the following command: with the following command:
```bash ```bash